home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1994-09-11 | 18.8 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6d 73 40 6d 6f 6c |piled by| rms@mol|
|00000020| 65 2e 67 6e 75 2e 61 69 | 2e 6d 69 74 2e 65 64 75 |e.gnu.ai|.mit.edu|
|00000030| 20 6f 6e 20 53 75 6e 20 | 53 65 70 20 31 31 20 32 | on Sun |Sep 11 2|
|00000040| 31 3a 31 30 3a 32 32 20 | 31 39 39 34 0a 3b 3b 3b |1:10:22 |1994.;;;|
|00000050| 20 66 72 6f 6d 20 66 69 | 6c 65 20 2f 68 6f 6d 65 | from fi|le /home|
|00000060| 2f 66 73 66 2f 72 6d 73 | 2f 65 31 39 2f 6c 69 73 |/fsf/rms|/e19/lis|
|00000070| 70 2f 73 68 65 6c 6c 2e | 65 6c 0a 3b 3b 3b 20 65 |p/shell.|el.;;; e|
|00000080| 6d 61 63 73 20 76 65 72 | 73 69 6f 6e 20 31 39 2e |macs ver|sion 19.|
|00000090| 32 36 2e 31 2e 0a 3b 3b | 3b 20 62 79 74 65 63 6f |26.1..;;|; byteco|
|000000a0| 6d 70 20 76 65 72 73 69 | 6f 6e 20 46 53 46 20 32 |mp versi|on FSF 2|
|000000b0| 2e 31 30 0a 3b 3b 3b 20 | 6f 70 74 69 6d 69 7a 61 |.10.;;; |optimiza|
|000000c0| 74 69 6f 6e 20 69 73 20 | 6f 6e 2e 0a 3b 3b 3b 20 |tion is |on..;;; |
|000000d0| 74 68 69 73 20 66 69 6c | 65 20 75 73 65 73 20 6f |this fil|e uses o|
|000000e0| 70 63 6f 64 65 73 20 77 | 68 69 63 68 20 64 6f 20 |pcodes w|hich do |
|000000f0| 6e 6f 74 20 65 78 69 73 | 74 20 69 6e 20 45 6d 61 |not exis|t in Ema|
|00000100| 63 73 20 31 38 2e 0a 0a | 28 69 66 20 28 61 6e 64 |cs 18...|(if (and|
|00000110| 20 28 62 6f 75 6e 64 70 | 20 27 65 6d 61 63 73 2d | (boundp| 'emacs-|
|00000120| 76 65 72 73 69 6f 6e 29 | 0a 09 20 28 6f 72 20 28 |version)|.. (or (|
|00000130| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 70 6f |and (bou|ndp 'epo|
|00000140| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 20 65 70 6f |ch::vers|ion) epo|
|00000150| 63 68 3a 3a 76 65 72 73 | 69 6f 6e 29 0a 09 20 20 |ch::vers|ion).. |
|00000160| 20 20 20 28 73 74 72 69 | 6e 67 2d 6c 65 73 73 70 | (stri|ng-lessp|
|00000170| 20 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 20 22 | emacs-v|ersion "|
|00000180| 31 39 22 29 29 29 0a 20 | 20 20 20 28 65 72 72 6f |19"))). | (erro|
|00000190| 72 20 22 60 2f 68 6f 6d | 65 2f 66 73 66 2f 72 6d |r "`/hom|e/fsf/rm|
|000001a0| 73 2f 65 31 39 2f 6c 69 | 73 70 2f 73 68 65 6c 6c |s/e19/li|sp/shell|
|000001b0| 2e 65 6c 27 20 77 61 73 | 20 63 6f 6d 70 69 6c 65 |.el' was| compile|
|000001c0| 64 20 66 6f 72 20 45 6d | 61 63 73 20 31 39 22 29 |d for Em|acs 19")|
|000001d0| 29 0a 0a 28 72 65 71 75 | 69 72 65 20 28 71 75 6f |)..(requ|ire (quo|
|000001e0| 74 65 20 63 6f 6d 69 6e | 74 29 29 0a 28 64 65 66 |te comin|t)).(def|
|000001f0| 76 61 72 20 73 68 65 6c | 6c 2d 70 72 6f 6d 70 74 |var shel|l-prompt|
|00000200| 2d 70 61 74 74 65 72 6e | 20 22 5e 5b 5e 23 24 25 |-pattern| "^[^#$%|
|00000210| 3e 5c 6e 5d 2a 5b 23 24 | 25 3e 5d 20 2a 22 20 22 |>\n]*[#$|%>] *" "|
|00000220| 5c 0a 52 65 67 65 78 70 | 20 74 6f 20 6d 61 74 63 |\.Regexp| to matc|
|00000230| 68 20 70 72 6f 6d 70 74 | 73 20 69 6e 20 74 68 65 |h prompt|s in the|
|00000240| 20 69 6e 66 65 72 69 6f | 72 20 73 68 65 6c 6c 2e | inferio|r shell.|
|00000250| 0a 44 65 66 61 75 6c 74 | 73 20 74 6f 20 5c 22 5e |.Default|s to \"^|
|00000260| 5b 5e 23 24 25 3e 5c 5c | 6e 5d 2a 5b 23 24 25 3e |[^#$%>\\|n]*[#$%>|
|00000270| 5d 20 2a 5c 22 2c 20 77 | 68 69 63 68 20 77 6f 72 |] *\", w|hich wor|
|00000280| 6b 73 20 70 72 65 74 74 | 79 20 77 65 6c 6c 2e 0a |ks prett|y well..|
|00000290| 54 68 69 73 20 76 61 72 | 69 61 62 6c 65 20 69 73 |This var|iable is|
|000002a0| 20 75 73 65 64 20 74 6f | 20 69 6e 69 74 69 61 6c | used to| initial|
|000002b0| 69 73 65 20 60 63 6f 6d | 69 6e 74 2d 70 72 6f 6d |ise `com|int-prom|
|000002c0| 70 74 2d 72 65 67 65 78 | 70 27 20 69 6e 20 74 68 |pt-regex|p' in th|
|000002d0| 65 20 0a 73 68 65 6c 6c | 20 62 75 66 66 65 72 2e |e .shell| buffer.|
|000002e0| 0a 0a 54 68 65 20 70 61 | 74 74 65 72 6e 20 73 68 |..The pa|ttern sh|
|000002f0| 6f 75 6c 64 20 70 72 6f | 62 61 62 6c 79 20 6e 6f |ould pro|bably no|
|00000300| 74 20 6d 61 74 63 68 20 | 6d 6f 72 65 20 74 68 61 |t match |more tha|
|00000310| 6e 20 6f 6e 65 20 6c 69 | 6e 65 2e 20 20 49 66 20 |n one li|ne. If |
|00000320| 69 74 20 64 6f 65 73 2c | 0a 73 68 65 6c 6c 2d 6d |it does,|.shell-m|
|00000330| 6f 64 65 20 6d 61 79 20 | 62 65 63 6f 6d 65 20 63 |ode may |become c|
|00000340| 6f 6e 66 75 73 65 64 20 | 74 72 79 69 6e 67 20 74 |onfused |trying t|
|00000350| 6f 20 64 69 73 74 69 6e | 67 75 69 73 68 20 70 72 |o distin|guish pr|
|00000360| 6f 6d 70 74 20 66 72 6f | 6d 20 69 6e 70 75 74 0a |ompt fro|m input.|
|00000370| 6f 6e 20 6c 69 6e 65 73 | 20 77 68 69 63 68 20 64 |on lines| which d|
|00000380| 6f 6e 27 74 20 73 74 61 | 72 74 20 77 69 74 68 20 |on't sta|rt with |
|00000390| 61 20 70 72 6f 6d 70 74 | 2e 0a 0a 54 68 69 73 20 |a prompt|...This |
|000003a0| 69 73 20 61 20 66 69 6e | 65 20 74 68 69 6e 67 20 |is a fin|e thing |
|000003b0| 74 6f 20 73 65 74 20 69 | 6e 20 79 6f 75 72 20 60 |to set i|n your `|
|000003c0| 2e 65 6d 61 63 73 27 20 | 66 69 6c 65 2e 22 29 0a |.emacs' |file.").|
|000003d0| 28 64 65 66 76 61 72 20 | 73 68 65 6c 6c 2d 63 6f |(defvar |shell-co|
|000003e0| 6d 70 6c 65 74 69 6f 6e | 2d 66 69 67 6e 6f 72 65 |mpletion|-fignore|
|000003f0| 20 6e 69 6c 20 22 5c 0a | 2a 4c 69 73 74 20 6f 66 | nil "\.|*List of|
|00000400| 20 73 75 66 66 69 78 65 | 73 20 74 6f 20 62 65 20 | suffixe|s to be |
|00000410| 64 69 73 72 65 67 61 72 | 64 65 64 20 64 75 72 69 |disregar|ded duri|
|00000420| 6e 67 20 66 69 6c 65 2f | 63 6f 6d 6d 61 6e 64 20 |ng file/|command |
|00000430| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2e 0a 54 68 69 73 |completi|on..This|
|00000440| 20 76 61 72 69 61 62 6c | 65 20 69 73 20 75 73 65 | variabl|e is use|
|00000450| 64 20 74 6f 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 |d to ini|tialize |
|00000460| 60 63 6f 6d 69 6e 74 2d | 63 6f 6d 70 6c 65 74 69 |`comint-|completi|
|00000470| 6f 6e 2d 66 69 67 6e 6f | 72 65 27 20 69 6e 20 74 |on-figno|re' in t|
|00000480| 68 65 20 73 68 65 6c 6c | 0a 62 75 66 66 65 72 2e |he shell|.buffer.|
|00000490| 20 20 54 68 65 20 64 65 | 66 61 75 6c 74 20 69 73 | The de|fault is|
|000004a0| 20 6e 69 6c 2c 20 66 6f | 72 20 63 6f 6d 70 61 74 | nil, fo|r compat|
|000004b0| 69 62 69 6c 69 74 79 20 | 77 69 74 68 20 6d 6f 73 |ibility |with mos|
|000004c0| 74 20 73 68 65 6c 6c 73 | 2e 0a 53 6f 6d 65 20 70 |t shells|..Some p|
|000004d0| 65 6f 70 6c 65 20 6c 69 | 6b 65 20 28 5c 22 7e 5c |eople li|ke (\"~\|
|000004e0| 22 20 5c 22 23 5c 22 20 | 5c 22 25 5c 22 29 2e 0a |" \"#\" |\"%\")..|
|000004f0| 0a 54 68 69 73 20 69 73 | 20 61 20 66 69 6e 65 20 |.This is| a fine |
|00000500| 74 68 69 6e 67 20 74 6f | 20 73 65 74 20 69 6e 20 |thing to| set in |
|00000510| 79 6f 75 72 20 60 2e 65 | 6d 61 63 73 27 20 66 69 |your `.e|macs' fi|
|00000520| 6c 65 2e 22 29 0a 28 64 | 65 66 76 61 72 20 73 68 |le.").(d|efvar sh|
|00000530| 65 6c 6c 2d 64 65 6c 69 | 6d 69 74 65 72 2d 61 72 |ell-deli|miter-ar|
|00000540| 67 75 6d 65 6e 74 2d 6c | 69 73 74 20 28 71 75 6f |gument-l|ist (quo|
|00000550| 74 65 20 28 31 32 34 20 | 33 38 20 36 30 20 36 32 |te (124 |38 60 62|
|00000560| 20 34 30 20 34 31 20 35 | 39 29 29 20 22 5c 0a 4c | 40 41 5|9)) "\.L|
|00000570| 69 73 74 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |ist of c|haracter|
|00000580| 73 20 74 6f 20 72 65 63 | 6f 67 6e 69 73 65 20 61 |s to rec|ognise a|
|00000590| 73 20 73 65 70 61 72 61 | 74 65 20 61 72 67 75 6d |s separa|te argum|
|000005a0| 65 6e 74 73 2e 0a 54 68 | 69 73 20 76 61 72 69 61 |ents..Th|is varia|
|000005b0| 62 6c 65 20 69 73 20 75 | 73 65 64 20 74 6f 20 69 |ble is u|sed to i|
|000005c0| 6e 69 74 69 61 6c 69 7a | 65 20 60 63 6f 6d 69 6e |nitializ|e `comin|
|000005d0| 74 2d 64 65 6c 69 6d 69 | 74 65 72 2d 61 72 67 75 |t-delimi|ter-argu|
|000005e0| 6d 65 6e 74 2d 6c 69 73 | 74 27 20 69 6e 20 74 68 |ment-lis|t' in th|
|000005f0| 65 0a 73 68 65 6c 6c 20 | 62 75 66 66 65 72 2e 20 |e.shell |buffer. |
|00000600| 20 54 68 65 20 64 65 66 | 61 75 6c 74 20 69 73 20 | The def|ault is |
|00000610| 28 3f 5c 5c 7c 20 3f 26 | 20 3f 3c 20 3f 3e 20 3f |(?\\| ?&| ?< ?> ?|
|00000620| 5c 5c 28 20 3f 5c 5c 29 | 20 3f 5c 5c 3b 29 2e 0a |\\( ?\\)| ?\\;)..|
|00000630| 0a 54 68 69 73 20 69 73 | 20 61 20 66 69 6e 65 20 |.This is| a fine |
|00000640| 74 68 69 6e 67 20 74 6f | 20 73 65 74 20 69 6e 20 |thing to| set in |
|00000650| 79 6f 75 72 20 60 2e 65 | 6d 61 63 73 27 20 66 69 |your `.e|macs' fi|
|00000660| 6c 65 2e 22 29 0a 28 64 | 65 66 76 61 72 20 73 68 |le.").(d|efvar sh|
|00000670| 65 6c 6c 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |ell-dyna|mic-comp|
|00000680| 6c 65 74 65 2d 66 75 6e | 63 74 69 6f 6e 73 20 28 |lete-fun|ctions (|
|00000690| 71 75 6f 74 65 20 28 63 | 6f 6d 69 6e 74 2d 72 65 |quote (c|omint-re|
|000006a0| 70 6c 61 63 65 2d 62 79 | 2d 65 78 70 61 6e 64 65 |place-by|-expande|
|000006b0| 64 2d 68 69 73 74 6f 72 | 79 20 73 68 65 6c 6c 2d |d-histor|y shell-|
|000006c0| 64 79 6e 61 6d 69 63 2d | 63 6f 6d 70 6c 65 74 65 |dynamic-|complete|
|000006d0| 2d 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2d 76 61 72 |-environ|ment-var|
|000006e0| 69 61 62 6c 65 20 73 68 | 65 6c 6c 2d 64 79 6e 61 |iable sh|ell-dyna|
|000006f0| 6d 69 63 2d 63 6f 6d 70 | 6c 65 74 65 2d 63 6f 6d |mic-comp|lete-com|
|00000700| 6d 61 6e 64 20 73 68 65 | 6c 6c 2d 72 65 70 6c 61 |mand she|ll-repla|
|00000710| 63 65 2d 62 79 2d 65 78 | 70 61 6e 64 65 64 2d 64 |ce-by-ex|panded-d|
|00000720| 69 72 65 63 74 6f 72 79 | 20 63 6f 6d 69 6e 74 2d |irectory| comint-|
|00000730| 64 79 6e 61 6d 69 63 2d | 63 6f 6d 70 6c 65 74 65 |dynamic-|complete|
|00000740| 2d 66 69 6c 65 6e 61 6d | 65 29 29 20 22 5c 0a 4c |-filenam|e)) "\.L|
|00000750| 69 73 74 20 6f 66 20 66 | 75 6e 63 74 69 6f 6e 73 |ist of f|unctions|
|00000760| 20 63 61 6c 6c 65 64 20 | 74 6f 20 70 65 72 66 6f | called |to perfo|
|00000770| 72 6d 20 63 6f 6d 70 6c | 65 74 69 6f 6e 2e 0a 54 |rm compl|etion..T|
|00000780| 68 69 73 20 76 61 72 69 | 61 62 6c 65 20 69 73 20 |his vari|able is |
|00000790| 75 73 65 64 20 74 6f 20 | 69 6e 69 74 69 61 6c 69 |used to |initiali|
|000007a0| 73 65 20 60 63 6f 6d 69 | 6e 74 2d 64 79 6e 61 6d |se `comi|nt-dynam|
|000007b0| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 66 75 6e 63 |ic-compl|ete-func|
|000007c0| 74 69 6f 6e 73 27 20 69 | 6e 20 74 68 65 0a 73 68 |tions' i|n the.sh|
|000007d0| 65 6c 6c 20 62 75 66 66 | 65 72 2e 0a 0a 54 68 69 |ell buff|er...Thi|
|000007e0| 73 20 69 73 20 61 20 66 | 69 6e 65 20 74 68 69 6e |s is a f|ine thin|
|000007f0| 67 20 74 6f 20 73 65 74 | 20 69 6e 20 79 6f 75 72 |g to set| in your|
|00000800| 20 60 2e 65 6d 61 63 73 | 27 20 66 69 6c 65 2e 22 | `.emacs|' file."|
|00000810| 29 0a 28 64 65 66 76 61 | 72 20 73 68 65 6c 6c 2d |).(defva|r shell-|
|00000820| 63 6f 6d 6d 61 6e 64 2d | 72 65 67 65 78 70 20 22 |command-|regexp "|
|00000830| 5b 5e 3b 26 7c 5c 6e 5d | 2b 22 20 22 5c 0a 2a 52 |[^;&|\n]|+" "\.*R|
|00000840| 65 67 65 78 70 20 74 6f | 20 6d 61 74 63 68 20 61 |egexp to| match a|
|00000850| 20 73 69 6e 67 6c 65 20 | 63 6f 6d 6d 61 6e 64 20 | single |command |
|00000860| 77 69 74 68 69 6e 20 61 | 20 70 69 70 65 6c 69 6e |within a| pipelin|
|00000870| 65 2e 0a 54 68 69 73 20 | 69 73 20 75 73 65 64 20 |e..This |is used |
|00000880| 66 6f 72 20 64 69 72 65 | 63 74 6f 72 79 20 74 72 |for dire|ctory tr|
|00000890| 61 63 6b 69 6e 67 20 61 | 6e 64 20 64 6f 65 73 20 |acking a|nd does |
|000008a0| 6e 6f 74 20 64 6f 20 61 | 20 70 65 72 66 65 63 74 |not do a| perfect|
|000008b0| 20 6a 6f 62 2e 22 29 0a | 28 64 65 66 76 61 72 20 | job.").|(defvar |
|000008c0| 73 68 65 6c 6c 2d 63 6f | 6d 70 6c 65 74 69 6f 6e |shell-co|mpletion|
|000008d0| 2d 65 78 65 63 6f 6e 6c | 79 20 74 20 22 5c 0a 2a |-execonl|y t "\.*|
|000008e0| 49 66 20 6e 6f 6e 2d 6e | 69 6c 2c 20 75 73 65 20 |If non-n|il, use |
|000008f0| 65 78 65 63 75 74 61 62 | 6c 65 20 66 69 6c 65 73 |executab|le files|
|00000900| 20 6f 6e 6c 79 20 66 6f | 72 20 63 6f 6d 70 6c 65 | only fo|r comple|
|00000910| 74 69 6f 6e 20 63 61 6e | 64 69 64 61 74 65 73 2e |tion can|didates.|
|00000920| 0a 54 68 69 73 20 6d 69 | 72 72 6f 72 73 20 74 68 |.This mi|rrors th|
|00000930| 65 20 6f 70 74 69 6f 6e | 61 6c 20 62 65 68 61 76 |e option|al behav|
|00000940| 69 6f 72 20 6f 66 20 74 | 63 73 68 2e 0a 0a 44 65 |ior of t|csh...De|
|00000950| 74 65 63 74 69 6e 67 20 | 65 78 65 63 75 74 61 62 |tecting |executab|
|00000960| 69 6c 69 74 79 20 6f 66 | 20 66 69 6c 65 73 20 6d |ility of| files m|
|00000970| 61 79 20 73 6c 6f 77 20 | 63 6f 6d 6d 61 6e 64 20 |ay slow |command |
|00000980| 63 6f 6d 70 6c 65 74 69 | 6f 6e 20 63 6f 6e 73 69 |completi|on consi|
|00000990| 64 65 72 61 62 6c 79 2e | 22 29 0a 28 64 65 66 76 |derably.|").(defv|
|000009a0| 61 72 20 73 68 65 6c 6c | 2d 70 6f 70 64 2d 72 65 |ar shell|-popd-re|
|000009b0| 67 65 78 70 20 22 70 6f | 70 64 22 20 22 5c 0a 2a |gexp "po|pd" "\.*|
|000009c0| 52 65 67 65 78 70 20 74 | 6f 20 6d 61 74 63 68 20 |Regexp t|o match |
|000009d0| 73 75 62 73 68 65 6c 6c | 20 63 6f 6d 6d 61 6e 64 |subshell| command|
|000009e0| 73 20 65 71 75 69 76 61 | 6c 65 6e 74 20 74 6f 20 |s equiva|lent to |
|000009f0| 70 6f 70 64 2e 22 29 0a | 28 64 65 66 76 61 72 20 |popd.").|(defvar |
|00000a00| 73 68 65 6c 6c 2d 70 75 | 73 68 64 2d 72 65 67 65 |shell-pu|shd-rege|
|00000a10| 78 70 20 22 70 75 73 68 | 64 22 20 22 5c 0a 2a 52 |xp "push|d" "\.*R|
|00000a20| 65 67 65 78 70 20 74 6f | 20 6d 61 74 63 68 20 73 |egexp to| match s|
|00000a30| 75 62 73 68 65 6c 6c 20 | 63 6f 6d 6d 61 6e 64 73 |ubshell |commands|
|00000a40| 20 65 71 75 69 76 61 6c | 65 6e 74 20 74 6f 20 70 | equival|ent to p|
|00000a50| 75 73 68 64 2e 22 29 0a | 28 64 65 66 76 61 72 20 |ushd.").|(defvar |
|00000a60| 73 68 65 6c 6c 2d 70 75 | 73 68 64 2d 74 6f 68 6f |shell-pu|shd-toho|
|00000a70| 6d 65 20 6e 69 6c 20 22 | 5c 0a 2a 49 66 20 6e 6f |me nil "|\.*If no|
|00000a80| 6e 2d 6e 69 6c 2c 20 6d | 61 6b 65 20 70 75 73 68 |n-nil, m|ake push|
|00000a90| 64 20 77 69 74 68 20 6e | 6f 20 61 72 67 20 62 65 |d with n|o arg be|
|00000aa0| 68 61 76 65 20 61 73 20 | 5c 22 70 75 73 68 64 20 |have as |\"pushd |
|00000ab0| 7e 5c 22 20 28 6c 69 6b | 65 20 63 64 29 2e 0a 54 |~\" (lik|e cd)..T|
|00000ac0| 68 69 73 20 6d 69 72 72 | 6f 72 73 20 74 68 65 20 |his mirr|ors the |
|00000ad0| 6f 70 74 69 6f 6e 61 6c | 20 62 65 68 61 76 69 6f |optional| behavio|
|00000ae0| 72 20 6f 66 20 74 63 73 | 68 2e 22 29 0a 28 64 65 |r of tcs|h.").(de|
|00000af0| 66 76 61 72 20 73 68 65 | 6c 6c 2d 70 75 73 68 64 |fvar she|ll-pushd|
|00000b00| 2d 64 65 78 74 72 61 63 | 74 20 6e 69 6c 20 22 5c |-dextrac|t nil "\|
|00000b10| 0a 2a 49 66 20 6e 6f 6e | 2d 6e 69 6c 2c 20 6d 61 |.*If non|-nil, ma|
|00000b20| 6b 65 20 5c 22 70 75 73 | 68 64 20 2b 6e 5c 22 20 |ke \"pus|hd +n\" |
|00000b30| 70 6f 70 20 74 68 65 20 | 6e 74 68 20 64 69 72 20 |pop the |nth dir |
|00000b40| 74 6f 20 74 68 65 20 73 | 74 61 63 6b 20 74 6f 70 |to the s|tack top|
|00000b50| 2e 0a 54 68 69 73 20 6d | 69 72 72 6f 72 73 20 74 |..This m|irrors t|
|00000b60| 68 65 20 6f 70 74 69 6f | 6e 61 6c 20 62 65 68 61 |he optio|nal beha|
|00000b70| 76 69 6f 72 20 6f 66 20 | 74 63 73 68 2e 22 29 0a |vior of |tcsh.").|
|00000b80| 28 64 65 66 76 61 72 20 | 73 68 65 6c 6c 2d 70 75 |(defvar |shell-pu|
|00000b90| 73 68 64 2d 64 75 6e 69 | 71 75 65 20 6e 69 6c 20 |shd-duni|que nil |
|00000ba0| 22 5c 0a 2a 49 66 20 6e | 6f 6e 2d 6e 69 6c 2c 20 |"\.*If n|on-nil, |
|00000bb0| 6d 61 6b 65 20 70 75 73 | 68 64 20 6f 6e 6c 79 20 |make pus|hd only |
|00000bc0| 61 64 64 20 75 6e 69 71 | 75 65 20 64 69 72 65 63 |add uniq|ue direc|
|00000bd0| 74 6f 72 69 65 73 20 74 | 6f 20 74 68 65 20 73 74 |tories t|o the st|
|00000be0| 61 63 6b 2e 0a 54 68 69 | 73 20 6d 69 72 72 6f 72 |ack..Thi|s mirror|
|00000bf0| 73 20 74 68 65 20 6f 70 | 74 69 6f 6e 61 6c 20 62 |s the op|tional b|
|00000c00| 65 68 61 76 69 6f 72 20 | 6f 66 20 74 63 73 68 2e |ehavior |of tcsh.|
|00000c10| 22 29 0a 28 64 65 66 76 | 61 72 20 73 68 65 6c 6c |").(defv|ar shell|
|00000c20| 2d 63 64 2d 72 65 67 65 | 78 70 20 22 63 64 22 20 |-cd-rege|xp "cd" |
|00000c30| 22 5c 0a 2a 52 65 67 65 | 78 70 20 74 6f 20 6d 61 |"\.*Rege|xp to ma|
|00000c40| 74 63 68 20 73 75 62 73 | 68 65 6c 6c 20 63 6f 6d |tch subs|hell com|
|00000c50| 6d 61 6e 64 73 20 65 71 | 75 69 76 61 6c 65 6e 74 |mands eq|uivalent|
|00000c60| 20 74 6f 20 63 64 2e 22 | 29 0a 28 64 65 66 76 61 | to cd."|).(defva|
|00000c70| 72 20 65 78 70 6c 69 63 | 69 74 2d 73 68 65 6c 6c |r explic|it-shell|
|00000c80| 2d 66 69 6c 65 2d 6e 61 | 6d 65 20 6e 69 6c 20 22 |-file-na|me nil "|
|00000c90| 5c 0a 2a 49 66 20 6e 6f | 6e 2d 6e 69 6c 2c 20 69 |\.*If no|n-nil, i|
|00000ca0| 73 20 66 69 6c 65 20 6e | 61 6d 65 20 74 6f 20 75 |s file n|ame to u|
|00000cb0| 73 65 20 66 6f 72 20 65 | 78 70 6c 69 63 69 74 6c |se for e|xplicitl|
|00000cc0| 79 20 72 65 71 75 65 73 | 74 65 64 20 69 6e 66 65 |y reques|ted infe|
|00000cd0| 72 69 6f 72 20 73 68 65 | 6c 6c 2e 22 29 0a 28 64 |rior she|ll.").(d|
|00000ce0| 65 66 76 61 72 20 65 78 | 70 6c 69 63 69 74 2d 63 |efvar ex|plicit-c|
|00000cf0| 73 68 2d 61 72 67 73 20 | 28 62 79 74 65 2d 63 6f |sh-args |(byte-co|
|00000d00| 64 65 20 22 08 c1 3d 83 | 08 00 c2 87 c3 87 22 20 |de "..=.|......" |
|00000d10| 5b 73 79 73 74 65 6d 2d | 74 79 70 65 20 68 70 75 |[system-|type hpu|
|00000d20| 78 20 28 22 2d 69 22 20 | 22 2d 54 22 29 20 28 22 |x ("-i" |"-T") ("|
|00000d30| 2d 69 22 29 5d 20 32 29 | 20 22 5c 0a 2a 41 72 67 |-i")] 2)| "\.*Arg|
|00000d40| 73 20 70 61 73 73 65 64 | 20 74 6f 20 69 6e 66 65 |s passed| to infe|
|00000d50| 72 69 6f 72 20 73 68 65 | 6c 6c 20 62 79 20 4d 2d |rior she|ll by M-|
|00000d60| 78 20 73 68 65 6c 6c 2c | 20 69 66 20 74 68 65 20 |x shell,| if the |
|00000d70| 73 68 65 6c 6c 20 69 73 | 20 63 73 68 2e 0a 56 61 |shell is| csh..Va|
|00000d80| 6c 75 65 20 69 73 20 61 | 20 6c 69 73 74 20 6f 66 |lue is a| list of|
|00000d90| 20 73 74 72 69 6e 67 73 | 2c 20 77 68 69 63 68 20 | strings|, which |
|00000da0| 6d 61 79 20 62 65 20 6e | 69 6c 2e 22 29 0a 28 64 |may be n|il.").(d|
|00000db0| 65 66 76 61 72 20 73 68 | 65 6c 6c 2d 69 6e 70 75 |efvar sh|ell-inpu|
|00000dc0| 74 2d 61 75 74 6f 65 78 | 70 61 6e 64 20 28 71 75 |t-autoex|pand (qu|
|00000dd0| 6f 74 65 20 68 69 73 74 | 6f 72 79 29 20 22 5c 0a |ote hist|ory) "\.|
|00000de0| 2a 49 66 20 6e 6f 6e 2d | 6e 69 6c 2c 20 65 78 70 |*If non-|nil, exp|
|00000df0| 61 6e 64 20 69 6e 70 75 | 74 20 63 6f 6d 6d 61 6e |and inpu|t comman|
|00000e00| 64 20 68 69 73 74 6f 72 | 79 20 72 65 66 65 72 65 |d histor|y refere|
|00000e10| 6e 63 65 73 20 6f 6e 20 | 63 6f 6d 70 6c 65 74 69 |nces on |completi|
|00000e20| 6f 6e 2e 0a 54 68 69 73 | 20 6d 69 72 72 6f 72 73 |on..This| mirrors|
|00000e30| 20 74 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 62 65 | the opt|ional be|
|00000e40| 68 61 76 69 6f 72 20 6f | 66 20 74 63 73 68 20 28 |havior o|f tcsh (|
|00000e50| 69 74 73 20 61 75 74 6f | 65 78 70 61 6e 64 20 61 |its auto|expand a|
|00000e60| 6e 64 20 68 69 73 74 6c | 69 74 29 2e 0a 0a 49 66 |nd histl|it)...If|
|00000e70| 20 74 68 65 20 76 61 6c | 75 65 20 69 73 20 60 69 | the val|ue is `i|
|00000e80| 6e 70 75 74 27 2c 20 74 | 68 65 6e 20 74 68 65 20 |nput', t|hen the |
|00000e90| 65 78 70 61 6e 73 69 6f | 6e 20 69 73 20 73 65 65 |expansio|n is see|
|00000ea0| 6e 20 6f 6e 20 69 6e 70 | 75 74 2e 0a 49 66 20 74 |n on inp|ut..If t|
|00000eb0| 68 65 20 76 61 6c 75 65 | 20 69 73 20 60 68 69 73 |he value| is `his|
|00000ec0| 74 6f 72 79 27 2c 20 74 | 68 65 6e 20 74 68 65 20 |tory', t|hen the |
|00000ed0| 65 78 70 61 6e 73 69 6f | 6e 20 69 73 20 6f 6e 6c |expansio|n is onl|
|00000ee0| 79 20 77 68 65 6e 20 69 | 6e 73 65 72 74 69 6e 67 |y when i|nserting|
|00000ef0| 0a 69 6e 74 6f 20 74 68 | 65 20 62 75 66 66 65 72 |.into th|e buffer|
|00000f00| 27 73 20 69 6e 70 75 74 | 20 72 69 6e 67 2e 20 20 |'s input| ring. |
|00000f10| 53 65 65 20 61 6c 73 6f | 20 60 63 6f 6d 69 6e 74 |See also| `comint|
|00000f20| 2d 6d 61 67 69 63 2d 73 | 70 61 63 65 27 20 61 6e |-magic-s|pace' an|
|00000f30| 64 0a 60 63 6f 6d 69 6e | 74 2d 64 79 6e 61 6d 69 |d.`comin|t-dynami|
|00000f40| 63 2d 63 6f 6d 70 6c 65 | 74 65 27 2e 0a 0a 54 68 |c-comple|te'...Th|
|00000f50| 69 73 20 76 61 72 69 61 | 62 6c 65 20 73 75 70 70 |is varia|ble supp|
|00000f60| 6c 69 65 73 20 61 20 64 | 65 66 61 75 6c 74 20 66 |lies a d|efault f|
|00000f70| 6f 72 20 60 63 6f 6d 69 | 6e 74 2d 69 6e 70 75 74 |or `comi|nt-input|
|00000f80| 2d 61 75 74 6f 65 78 70 | 61 6e 64 27 2c 0a 66 6f |-autoexp|and',.fo|
|00000f90| 72 20 53 68 65 6c 6c 20 | 6d 6f 64 65 20 6f 6e 6c |r Shell |mode onl|
|00000fa0| 79 2e 22 29 0a 28 64 65 | 66 76 61 72 20 73 68 65 |y.").(de|fvar she|
|00000fb0| 6c 6c 2d 64 69 72 73 74 | 61 63 6b 20 6e 69 6c 20 |ll-dirst|ack nil |
|00000fc0| 22 5c 0a 4c 69 73 74 20 | 6f 66 20 64 69 72 65 63 |"\.List |of direc|
|00000fd0| 74 6f 72 69 65 73 20 73 | 61 76 65 64 20 62 79 20 |tories s|aved by |
|00000fe0| 70 75 73 68 64 20 69 6e | 20 74 68 69 73 20 62 75 |pushd in| this bu|
|00000ff0| 66 66 65 72 27 73 20 73 | 68 65 6c 6c 2e 0a 54 68 |ffer's s|hell..Th|
|00001000| 75 73 2c 20 74 68 69 73 | 20 64 6f 65 73 20 6e 6f |us, this| does no|
|00001010| 74 20 69 6e 63 6c 75 64 | 65 20 74 68 65 20 73 68 |t includ|e the sh|
|00001020| 65 6c 6c 27 73 20 63 75 | 72 72 65 6e 74 20 64 69 |ell's cu|rrent di|
|00001030| 72 65 63 74 6f 72 79 2e | 22 29 0a 28 64 65 66 76 |rectory.|").(defv|
|00001040| 61 72 20 73 68 65 6c 6c | 2d 64 69 72 74 72 61 63 |ar shell|-dirtrac|
|00001050| 6b 70 20 74 20 22 5c 0a | 4e 6f 6e 2d 6e 69 6c 20 |kp t "\.|Non-nil |
|00001060| 69 6e 20 61 20 73 68 65 | 6c 6c 20 62 75 66 66 65 |in a she|ll buffe|
|00001070| 72 20 6d 65 61 6e 73 20 | 64 69 72 65 63 74 6f 72 |r means |director|
|00001080| 79 20 74 72 61 63 6b 69 | 6e 67 20 69 73 20 65 6e |y tracki|ng is en|
|00001090| 61 62 6c 65 64 2e 22 29 | 0a 28 64 65 66 76 61 72 |abled.")|.(defvar|
|000010a0| 20 73 68 65 6c 6c 2d 6c | 61 73 74 2d 64 69 72 20 | shell-l|ast-dir |
|000010b0| 6e 69 6c 20 22 5c 0a 4b | 65 65 70 20 74 72 61 63 |nil "\.K|eep trac|
|000010c0| 6b 20 6f 66 20 6c 61 73 | 74 20 64 69 72 65 63 74 |k of las|t direct|
|000010d0| 6f 72 79 20 66 6f 72 20 | 6b 73 68 20 60 63 64 20 |ory for |ksh `cd |
|000010e0| 2d 27 20 63 6f 6d 6d 61 | 6e 64 2e 22 29 0a 28 64 |-' comma|nd.").(d|
|000010f0| 65 66 76 61 72 20 73 68 | 65 6c 6c 2d 64 69 72 73 |efvar sh|ell-dirs|
|00001100| 74 61 63 6b 2d 71 75 65 | 72 79 20 6e 69 6c 20 22 |tack-que|ry nil "|
|00001110| 5c 0a 43 6f 6d 6d 61 6e | 64 20 75 73 65 64 20 62 |\.Comman|d used b|
|00001120| 79 20 60 73 68 65 6c 6c | 2d 72 65 73 79 6e 63 2d |y `shell|-resync-|
|00001130| 64 69 72 27 20 74 6f 20 | 71 75 65 72 79 20 74 68 |dir' to |query th|
|00001140| 65 20 73 68 65 6c 6c 2e | 22 29 0a 28 62 79 74 65 |e shell.|").(byte|
|00001150| 2d 63 6f 64 65 20 22 c0 | c1 21 84 08 00 c2 11 09 |-code ".|.!......|
|00001160| 84 3c 00 c3 5c 66 21 11 | c5 09 c6 c7 23 88 c5 09 |.<..\f!.|....#...|
|00001170| c8 c9 23 88 c5 09 ca cb | 23 88 c5 09 cc cd 23 88 |..#.....|#.....#.|
|00001180| ce cf 09 d0 5c 22 d1 d2 | d3 24 88 ce cf 09 d4 5c |....\"..|.$.....\|
|00001190| 22 d5 d6 d7 24 88 c2 87 | 22 20 5b 62 6f 75 6e 64 |"...$...|" [bound|
|000011a0| 70 20 73 68 65 6c 6c 2d | 6d 6f 64 65 2d 6d 61 70 |p shell-|mode-map|
|000011b0| 20 6e 69 6c 20 63 6f 70 | 79 2d 6b 65 79 6d 61 70 | nil cop|y-keymap|
|000011c0| 20 63 6f 6d 69 6e 74 2d | 6d 6f 64 65 2d 6d 61 70 | comint-|mode-map|
|000011d0| 20 64 65 66 69 6e 65 2d | 6b 65 79 20 22 03 06 22 | define-|key ".."|
|000011e0| 20 73 68 65 6c 6c 2d 66 | 6f 72 77 61 72 64 2d 63 | shell-f|orward-c|
|000011f0| 6f 6d 6d 61 6e 64 20 22 | 03 02 22 20 73 68 65 6c |ommand "|.." shel|
|00001200| 6c 2d 62 61 63 6b 77 61 | 72 64 2d 63 6f 6d 6d 61 |l-backwa|rd-comma|
|00001210| 6e 64 20 22 09 22 20 63 | 6f 6d 69 6e 74 2d 64 79 |nd "." c|omint-dy|
|00001220| 6e 61 6d 69 63 2d 63 6f | 6d 70 6c 65 74 65 20 22 |namic-co|mplete "|
|00001230| bf 22 20 63 6f 6d 69 6e | 74 2d 64 79 6e 61 6d 69 |." comin|t-dynami|
|00001240| 63 2d 6c 69 73 74 2d 66 | 69 6c 65 6e 61 6d 65 2d |c-list-f|ilename-|
|00001250| 63 6f 6d 70 6c 65 74 69 | 6f 6e 73 20 64 65 66 69 |completi|ons defi|
|00001260| 6e 65 2d 6b 65 79 2d 61 | 66 74 65 72 20 6c 6f 6f |ne-key-a|fter loo|
|00001270| 6b 75 70 2d 6b 65 79 20 | 5b 6d 65 6e 75 2d 62 61 |kup-key |[menu-ba|
|00001280| 72 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 5d 20 5b 63 |r comple|tion] [c|
|00001290| 6f 6d 70 6c 65 74 65 2d | 65 6e 76 2d 76 61 72 69 |omplete-|env-vari|
|000012a0| 61 62 6c 65 5d 20 28 22 | 43 6f 6d 70 6c 65 74 65 |able] ("|Complete|
|000012b0| 20 45 6e 76 2e 20 56 61 | 72 69 61 62 6c 65 20 4e | Env. Va|riable N|
|000012c0| 61 6d 65 22 20 2e 20 73 | 68 65 6c 6c 2d 64 79 6e |ame" . s|hell-dyn|
|000012d0| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 65 6e |amic-com|plete-en|
|000012e0| 76 69 72 6f 6e 6d 65 6e | 74 2d 76 61 72 69 61 62 |vironmen|t-variab|
|000012f0| 6c 65 29 20 63 6f 6d 70 | 6c 65 74 65 2d 66 69 6c |le) comp|lete-fil|
|00001300| 65 20 5b 6d 65 6e 75 2d | 62 61 72 20 63 6f 6d 70 |e [menu-|bar comp|
|00001310| 6c 65 74 69 6f 6e 5d 20 | 5b 65 78 70 61 6e 64 2d |letion] |[expand-|
|00001320| 64 69 72 65 63 74 6f 72 | 79 5d 20 28 22 45 78 70 |director|y] ("Exp|
|00001330| 61 6e 64 20 44 69 72 65 | 63 74 6f 72 79 20 52 65 |and Dire|ctory Re|
|00001340| 66 65 72 65 6e 63 65 22 | 20 2e 20 73 68 65 6c 6c |ference"| . shell|
|00001350| 2d 72 65 70 6c 61 63 65 | 2d 62 79 2d 65 78 70 61 |-replace|-by-expa|
|00001360| 6e 64 65 64 2d 64 69 72 | 65 63 74 6f 72 79 29 20 |nded-dir|ectory) |
|00001370| 63 6f 6d 70 6c 65 74 65 | 2d 65 78 70 61 6e 64 5d |complete|-expand]|
|00001380| 20 35 29 0a 28 64 65 66 | 76 61 72 20 73 68 65 6c | 5).(def|var shel|
|00001390| 6c 2d 6d 6f 64 65 2d 68 | 6f 6f 6b 20 6e 69 6c 20 |l-mode-h|ook nil |
|000013a0| 22 5c 0a 2a 48 6f 6f 6b | 20 66 6f 72 20 63 75 73 |"\.*Hook| for cus|
|000013b0| 74 6f 6d 69 73 69 6e 67 | 20 53 68 65 6c 6c 20 6d |tomising| Shell m|
|000013c0| 6f 64 65 2e 22 29 0a 28 | 64 65 66 61 6c 69 61 73 |ode.").(|defalias|
|000013d0| 20 27 73 68 65 6c 6c 2d | 6d 6f 64 65 20 23 5b 6e | 'shell-|mode #[n|
|000013e0| 69 6c 20 22 c0 20 88 c1 | 12 c3 14 c5 0e 06 21 88 |il ". ..|......!.|
|000013f0| 0e 07 16 08 0e 09 16 5c | 6e 0e 0b 16 5c 66 0e 0d |.......\|n...\f..|
|00001400| 16 0e cf d0 21 88 0e 08 | 16 10 cf d1 21 88 d2 16 |....!...|....!...|
|00001410| 11 d2 16 13 cf d4 21 88 | d5 16 14 d6 d7 d8 5c 22 |......!.|......\"|
|00001420| 88 0e 19 16 1a db dc dd | 70 21 21 40 21 1e 1e df |........|p!!@!...|
|00001430| e0 21 86 65 00 0e 1e e1 | 98 83 59 00 e2 82 65 00 |.!.e....|..Y...e.|
|00001440| 0e 1e e3 98 83 64 00 e4 | 82 65 00 e5 89 16 26 e7 |.....d..|.e....&.|
|00001450| 9a 83 70 00 d2 16 26 e8 | e9 0e 1e 5c 22 83 7c 00 |..p...&.|...\".|.|
|00001460| ea 82 7d 00 eb 16 2c 29 | ed ee 21 88 ef d5 21 87 |..}...,)|..!...!.|
|00001470| 22 20 5b 63 6f 6d 69 6e | 74 2d 6d 6f 64 65 20 73 |" [comin|t-mode s|
|00001480| 68 65 6c 6c 2d 6d 6f 64 | 65 20 6d 61 6a 6f 72 2d |hell-mod|e major-|
|00001490| 6d 6f 64 65 20 22 53 68 | 65 6c 6c 22 20 6d 6f 64 |mode "Sh|ell" mod|
|000014a0| 65 2d 6e 61 6d 65 20 75 | 73 65 2d 6c 6f 63 61 6c |e-name u|se-local|
|000014b0| 2d 6d 61 70 20 73 68 65 | 6c 6c 2d 6d 6f 64 65 2d |-map she|ll-mode-|
|000014c0| 6d 61 70 20 73 68 65 6c | 6c 2d 70 72 6f 6d 70 74 |map shel|l-prompt|
|000014d0| 2d 70 61 74 74 65 72 6e | 20 63 6f 6d 69 6e 74 2d |-pattern| comint-|
|000014e0| 70 72 6f 6d 70 74 2d 72 | 65 67 65 78 70 20 73 68 |prompt-r|egexp sh|
|000014f0| 65 6c 6c 2d 63 6f 6d 70 | 6c 65 74 69 6f 6e 2d 66 |ell-comp|letion-f|
|00001500| 69 67 6e 6f 72 65 20 63 | 6f 6d 69 6e 74 2d 63 6f |ignore c|omint-co|
|00001510| 6d 70 6c 65 74 69 6f 6e | 2d 66 69 67 6e 6f 72 65 |mpletion|-fignore|
|00001520| 20 73 68 65 6c 6c 2d 64 | 65 6c 69 6d 69 74 65 72 | shell-d|elimiter|
|00001530| 2d 61 72 67 75 6d 65 6e | 74 2d 6c 69 73 74 20 63 |-argumen|t-list c|
|00001540| 6f 6d 69 6e 74 2d 64 65 | 6c 69 6d 69 74 65 72 2d |omint-de|limiter-|
|00001550| 61 72 67 75 6d 65 6e 74 | 2d 6c 69 73 74 20 73 68 |argument|-list sh|
|00001560| 65 6c 6c 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |ell-dyna|mic-comp|
|00001570| 6c 65 74 65 2d 66 75 6e | 63 74 69 6f 6e 73 20 63 |lete-fun|ctions c|
|00001580| 6f 6d 69 6e 74 2d 64 79 | 6e 61 6d 69 63 2d 63 6f |omint-dy|namic-co|
|00001590| 6d 70 6c 65 74 65 2d 66 | 75 6e 63 74 69 6f 6e 73 |mplete-f|unctions|
|000015a0| 20 6d 61 6b 65 2d 6c 6f | 63 61 6c 2d 76 61 72 69 | make-lo|cal-vari|
|000015b0| 61 62 6c 65 20 70 61 72 | 61 67 72 61 70 68 2d 73 |able par|agraph-s|
|000015c0| 74 61 72 74 20 73 68 65 | 6c 6c 2d 64 69 72 73 74 |tart she|ll-dirst|
|000015d0| 61 63 6b 20 6e 69 6c 20 | 73 68 65 6c 6c 2d 6c 61 |ack nil |shell-la|
|000015e0| 73 74 2d 64 69 72 20 73 | 68 65 6c 6c 2d 64 69 72 |st-dir s|hell-dir|
|000015f0| 74 72 61 63 6b 70 20 74 | 20 61 64 64 2d 68 6f 6f |trackp t| add-hoo|
|00001600| 6b 20 63 6f 6d 69 6e 74 | 2d 69 6e 70 75 74 2d 66 |k comint|-input-f|
|00001610| 69 6c 74 65 72 2d 66 75 | 6e 63 74 69 6f 6e 73 20 |ilter-fu|nctions |
|00001620| 73 68 65 6c 6c 2d 64 69 | 72 65 63 74 6f 72 79 2d |shell-di|rectory-|
|00001630| 74 72 61 63 6b 65 72 20 | 73 68 65 6c 6c 2d 69 6e |tracker |shell-in|
|00001640| 70 75 74 2d 61 75 74 6f | 65 78 70 61 6e 64 20 63 |put-auto|expand c|
|00001650| 6f 6d 69 6e 74 2d 69 6e | 70 75 74 2d 61 75 74 6f |omint-in|put-auto|
|00001660| 65 78 70 61 6e 64 20 66 | 69 6c 65 2d 6e 61 6d 65 |expand f|ile-name|
|00001670| 2d 6e 6f 6e 64 69 72 65 | 63 74 6f 72 79 20 70 72 |-nondire|ctory pr|
|00001680| 6f 63 65 73 73 2d 63 6f | 6d 6d 61 6e 64 20 67 65 |ocess-co|mmand ge|
|00001690| 74 2d 62 75 66 66 65 72 | 2d 70 72 6f 63 65 73 73 |t-buffer|-process|
|000016a0| 20 73 68 65 6c 6c 20 67 | 65 74 65 6e 76 20 22 48 | shell g|etenv "H|
|000016b0| 49 53 54 46 49 4c 45 22 | 20 22 62 61 73 68 22 20 |ISTFILE"| "bash" |
|000016c0| 22 7e 2f 2e 62 61 73 68 | 5f 68 69 73 74 6f 72 79 |"~/.bash|_history|
|000016d0| 22 20 22 6b 73 68 22 20 | 22 7e 2f 2e 73 68 5f 68 |" "ksh" |"~/.sh_h|
|000016e0| 69 73 74 6f 72 79 22 20 | 22 7e 2f 2e 68 69 73 74 |istory" |"~/.hist|
|000016f0| 6f 72 79 22 20 63 6f 6d | 69 6e 74 2d 69 6e 70 75 |ory" com|int-inpu|
|00001700| 74 2d 72 69 6e 67 2d 66 | 69 6c 65 2d 6e 61 6d 65 |t-ring-f|ile-name|
|00001710| 20 22 2f 64 65 76 2f 6e | 75 6c 6c 22 20 73 74 72 | "/dev/n|ull" str|
|00001720| 69 6e 67 2d 6d 61 74 63 | 68 20 22 5e 6b 3f 73 68 |ing-matc|h "^k?sh|
|00001730| 24 22 20 22 70 77 64 22 | 20 22 64 69 72 73 22 20 |$" "pwd"| "dirs" |
|00001740| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 2d 71 |shell-di|rstack-q|
|00001750| 75 65 72 79 20 72 75 6e | 2d 68 6f 6f 6b 73 20 73 |uery run|-hooks s|
|00001760| 68 65 6c 6c 2d 6d 6f 64 | 65 2d 68 6f 6f 6b 20 63 |hell-mod|e-hook c|
|00001770| 6f 6d 69 6e 74 2d 72 65 | 61 64 2d 69 6e 70 75 74 |omint-re|ad-input|
|00001780| 2d 72 69 6e 67 5d 20 35 | 20 22 5c 0a 4d 61 6a 6f |-ring] 5| "\.Majo|
|00001790| 72 20 6d 6f 64 65 20 66 | 6f 72 20 69 6e 74 65 72 |r mode f|or inter|
|000017a0| 61 63 74 69 6e 67 20 77 | 69 74 68 20 61 6e 20 69 |acting w|ith an i|
|000017b0| 6e 66 65 72 69 6f 72 20 | 73 68 65 6c 6c 2e 0a 52 |nferior |shell..R|
|000017c0| 65 74 75 72 6e 20 61 66 | 74 65 72 20 74 68 65 20 |eturn af|ter the |
|000017d0| 65 6e 64 20 6f 66 20 74 | 68 65 20 70 72 6f 63 65 |end of t|he proce|
|000017e0| 73 73 27 20 6f 75 74 70 | 75 74 20 73 65 6e 64 73 |ss' outp|ut sends|
|000017f0| 20 74 68 65 20 74 65 78 | 74 20 66 72 6f 6d 20 74 | the tex|t from t|
|00001800| 68 65 20 0a 20 20 20 20 | 65 6e 64 20 6f 66 20 70 |he . |end of p|
|00001810| 72 6f 63 65 73 73 20 74 | 6f 20 74 68 65 20 65 6e |rocess t|o the en|
|00001820| 64 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |d of the| current|
|00001830| 20 6c 69 6e 65 2e 0a 52 | 65 74 75 72 6e 20 62 65 | line..R|eturn be|
|00001840| 66 6f 72 65 20 65 6e 64 | 20 6f 66 20 70 72 6f 63 |fore end| of proc|
|00001850| 65 73 73 20 6f 75 74 70 | 75 74 20 63 6f 70 69 65 |ess outp|ut copie|
|00001860| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 69 |s the cu|rrent li|
|00001870| 6e 65 20 28 65 78 63 65 | 70 74 0a 20 20 20 20 66 |ne (exce|pt. f|
|00001880| 6f 72 20 74 68 65 20 70 | 72 6f 6d 70 74 29 20 74 |or the p|rompt) t|
|00001890| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |o the en|d of the|
|000018a0| 20 62 75 66 66 65 72 20 | 61 6e 64 20 73 65 6e 64 | buffer |and send|
|000018b0| 73 20 69 74 2e 0a 4d 2d | 78 20 73 65 6e 64 2d 69 |s it..M-|x send-i|
|000018c0| 6e 76 69 73 69 62 6c 65 | 20 72 65 61 64 73 20 61 |nvisible| reads a|
|000018d0| 20 6c 69 6e 65 20 6f 66 | 20 74 65 78 74 20 77 69 | line of| text wi|
|000018e0| 74 68 6f 75 74 20 65 63 | 68 6f 69 6e 67 20 69 74 |thout ec|hoing it|
|000018f0| 2c 20 61 6e 64 20 73 65 | 6e 64 73 20 69 74 20 74 |, and se|nds it t|
|00001900| 6f 0a 20 20 20 20 74 68 | 65 20 73 68 65 6c 6c 2e |o. th|e shell.|
|00001910| 20 20 54 68 69 73 20 69 | 73 20 75 73 65 66 75 6c | This i|s useful|
|00001920| 20 66 6f 72 20 65 6e 74 | 65 72 69 6e 67 20 70 61 | for ent|ering pa|
|00001930| 73 73 77 6f 72 64 73 2e | 20 20 4f 72 2c 20 61 64 |sswords.| Or, ad|
|00001940| 64 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 0a 20 |d the fu|nction. |
|00001950| 20 20 20 60 63 6f 6d 69 | 6e 74 2d 77 61 74 63 68 | `comi|nt-watch|
|00001960| 2d 66 6f 72 2d 70 61 73 | 73 77 6f 72 64 2d 70 72 |-for-pas|sword-pr|
|00001970| 6f 6d 70 74 27 20 74 6f | 20 60 63 6f 6d 69 6e 74 |ompt' to| `comint|
|00001980| 2d 6f 75 74 70 75 74 2d | 66 69 6c 74 65 72 2d 66 |-output-|filter-f|
|00001990| 75 6e 63 74 69 6f 6e 73 | 27 2e 0a 0a 49 66 20 79 |unctions|'...If y|
|000019a0| 6f 75 20 61 63 63 69 64 | 65 6e 74 61 6c 6c 79 20 |ou accid|entally |
|000019b0| 73 75 73 70 65 6e 64 20 | 79 6f 75 72 20 70 72 6f |suspend |your pro|
|000019c0| 63 65 73 73 2c 20 75 73 | 65 20 5c 5c 5b 63 6f 6d |cess, us|e \\[com|
|000019d0| 69 6e 74 2d 63 6f 6e 74 | 69 6e 75 65 2d 73 75 62 |int-cont|inue-sub|
|000019e0| 6a 6f 62 5d 0a 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |job].to |continue|
|000019f0| 20 69 74 2e 0a 0a 63 64 | 2c 20 70 75 73 68 64 20 | it...cd|, pushd |
|00001a00| 61 6e 64 20 70 6f 70 64 | 20 63 6f 6d 6d 61 6e 64 |and popd| command|
|00001a10| 73 20 67 69 76 65 6e 20 | 74 6f 20 74 68 65 20 73 |s given |to the s|
|00001a20| 68 65 6c 6c 20 61 72 65 | 20 77 61 74 63 68 65 64 |hell are| watched|
|00001a30| 20 62 79 20 45 6d 61 63 | 73 20 74 6f 20 6b 65 65 | by Emac|s to kee|
|00001a40| 70 0a 74 68 69 73 20 62 | 75 66 66 65 72 27 73 20 |p.this b|uffer's |
|00001a50| 64 65 66 61 75 6c 74 20 | 64 69 72 65 63 74 6f 72 |default |director|
|00001a60| 79 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 74 68 |y the sa|me as th|
|00001a70| 65 20 73 68 65 6c 6c 27 | 73 20 77 6f 72 6b 69 6e |e shell'|s workin|
|00001a80| 67 20 64 69 72 65 63 74 | 6f 72 79 2e 0a 4d 2d 78 |g direct|ory..M-x|
|00001a90| 20 64 69 72 73 20 71 75 | 65 72 69 65 73 20 74 68 | dirs qu|eries th|
|00001aa0| 65 20 73 68 65 6c 6c 20 | 61 6e 64 20 72 65 73 79 |e shell |and resy|
|00001ab0| 6e 63 73 20 45 6d 61 63 | 73 27 20 69 64 65 61 20 |ncs Emac|s' idea |
|00001ac0| 6f 66 20 77 68 61 74 20 | 74 68 65 20 63 75 72 72 |of what |the curr|
|00001ad0| 65 6e 74 20 0a 20 20 20 | 20 64 69 72 65 63 74 6f |ent . | directo|
|00001ae0| 72 79 20 73 74 61 63 6b | 20 69 73 2e 0a 4d 2d 78 |ry stack| is..M-x|
|00001af0| 20 64 69 72 74 72 61 63 | 6b 2d 74 6f 67 67 6c 65 | dirtrac|k-toggle|
|00001b00| 20 74 75 72 6e 73 20 64 | 69 72 65 63 74 6f 72 79 | turns d|irectory|
|00001b10| 20 74 72 61 63 6b 69 6e | 67 20 6f 6e 20 61 6e 64 | trackin|g on and|
|00001b20| 20 6f 66 66 2e 0a 0a 5c | 5c 7b 73 68 65 6c 6c 2d | off...\|\{shell-|
|00001b30| 6d 6f 64 65 2d 6d 61 70 | 7d 0a 43 75 73 74 6f 6d |mode-map|}.Custom|
|00001b40| 69 7a 61 74 69 6f 6e 3a | 20 45 6e 74 72 79 20 74 |ization:| Entry t|
|00001b50| 6f 20 74 68 69 73 20 6d | 6f 64 65 20 72 75 6e 73 |o this m|ode runs|
|00001b60| 20 74 68 65 20 68 6f 6f | 6b 73 20 6f 6e 20 60 63 | the hoo|ks on `c|
|00001b70| 6f 6d 69 6e 74 2d 6d 6f | 64 65 2d 68 6f 6f 6b 27 |omint-mo|de-hook'|
|00001b80| 20 61 6e 64 0a 60 73 68 | 65 6c 6c 2d 6d 6f 64 65 | and.`sh|ell-mode|
|00001b90| 2d 68 6f 6f 6b 27 20 28 | 69 6e 20 74 68 61 74 20 |-hook' (|in that |
|00001ba0| 6f 72 64 65 72 29 2e 20 | 20 42 65 66 6f 72 65 20 |order). | Before |
|00001bb0| 65 61 63 68 20 69 6e 70 | 75 74 2c 20 74 68 65 20 |each inp|ut, the |
|00001bc0| 68 6f 6f 6b 73 20 6f 6e | 0a 60 63 6f 6d 69 6e 74 |hooks on|.`comint|
|00001bd0| 2d 69 6e 70 75 74 2d 66 | 69 6c 74 65 72 2d 66 75 |-input-f|ilter-fu|
|00001be0| 6e 63 74 69 6f 6e 73 27 | 20 61 72 65 20 72 75 6e |nctions'| are run|
|00001bf0| 2e 20 20 41 66 74 65 72 | 20 65 61 63 68 20 73 68 |. After| each sh|
|00001c00| 65 6c 6c 20 6f 75 74 70 | 75 74 2c 20 74 68 65 20 |ell outp|ut, the |
|00001c10| 68 6f 6f 6b 73 0a 6f 6e | 20 60 63 6f 6d 69 6e 74 |hooks.on| `comint|
|00001c20| 2d 6f 75 74 70 75 74 2d | 66 69 6c 74 65 72 2d 66 |-output-|filter-f|
|00001c30| 75 6e 63 74 69 6f 6e 73 | 27 20 61 72 65 20 72 75 |unctions|' are ru|
|00001c40| 6e 2e 0a 0a 56 61 72 69 | 61 62 6c 65 73 20 60 73 |n...Vari|ables `s|
|00001c50| 68 65 6c 6c 2d 63 64 2d | 72 65 67 65 78 70 27 2c |hell-cd-|regexp',|
|00001c60| 20 60 73 68 65 6c 6c 2d | 70 75 73 68 64 2d 72 65 | `shell-|pushd-re|
|00001c70| 67 65 78 70 27 20 61 6e | 64 20 60 73 68 65 6c 6c |gexp' an|d `shell|
|00001c80| 2d 70 6f 70 64 2d 72 65 | 67 65 78 70 27 0a 61 72 |-popd-re|gexp'.ar|
|00001c90| 65 20 75 73 65 64 20 74 | 6f 20 6d 61 74 63 68 20 |e used t|o match |
|00001ca0| 74 68 65 69 72 20 72 65 | 73 70 65 63 74 69 76 65 |their re|spective|
|00001cb0| 20 63 6f 6d 6d 61 6e 64 | 73 2c 20 77 68 69 6c 65 | command|s, while|
|00001cc0| 20 60 73 68 65 6c 6c 2d | 70 75 73 68 64 2d 74 6f | `shell-|pushd-to|
|00001cd0| 68 6f 6d 65 27 2c 0a 60 | 73 68 65 6c 6c 2d 70 75 |home',.`|shell-pu|
|00001ce0| 73 68 64 2d 64 65 78 74 | 72 61 63 74 27 20 61 6e |shd-dext|ract' an|
|00001cf0| 64 20 60 73 68 65 6c 6c | 2d 70 75 73 68 64 2d 64 |d `shell|-pushd-d|
|00001d00| 75 6e 69 71 75 65 27 20 | 63 6f 6e 74 72 6f 6c 20 |unique' |control |
|00001d10| 74 68 65 20 62 65 68 61 | 76 69 6f 72 20 6f 66 20 |the beha|vior of |
|00001d20| 74 68 65 0a 72 65 6c 65 | 76 61 6e 74 20 63 6f 6d |the.rele|vant com|
|00001d30| 6d 61 6e 64 2e 0a 0a 56 | 61 72 69 61 62 6c 65 73 |mand...V|ariables|
|00001d40| 20 60 63 6f 6d 69 6e 74 | 2d 63 6f 6d 70 6c 65 74 | `comint|-complet|
|00001d50| 69 6f 6e 2d 61 75 74 6f | 6c 69 73 74 27 2c 20 60 |ion-auto|list', `|
|00001d60| 63 6f 6d 69 6e 74 2d 63 | 6f 6d 70 6c 65 74 69 6f |comint-c|ompletio|
|00001d70| 6e 2d 61 64 64 73 75 66 | 66 69 78 27 2c 0a 60 63 |n-addsuf|fix',.`c|
|00001d80| 6f 6d 69 6e 74 2d 63 6f | 6d 70 6c 65 74 69 6f 6e |omint-co|mpletion|
|00001d90| 2d 72 65 63 65 78 61 63 | 74 27 20 61 6e 64 20 60 |-recexac|t' and `|
|00001da0| 63 6f 6d 69 6e 74 2d 63 | 6f 6d 70 6c 65 74 69 6f |comint-c|ompletio|
|00001db0| 6e 2d 66 69 67 6e 6f 72 | 65 27 20 63 6f 6e 74 72 |n-fignor|e' contr|
|00001dc0| 6f 6c 20 74 68 65 0a 62 | 65 68 61 76 69 6f 72 20 |ol the.b|ehavior |
|00001dd0| 6f 66 20 66 69 6c 65 20 | 6e 61 6d 65 2c 20 63 6f |of file |name, co|
|00001de0| 6d 6d 61 6e 64 20 6e 61 | 6d 65 20 61 6e 64 20 76 |mmand na|me and v|
|00001df0| 61 72 69 61 62 6c 65 20 | 6e 61 6d 65 20 63 6f 6d |ariable |name com|
|00001e00| 70 6c 65 74 69 6f 6e 2e | 20 20 56 61 72 69 61 62 |pletion.| Variab|
|00001e10| 6c 65 0a 60 73 68 65 6c | 6c 2d 63 6f 6d 70 6c 65 |le.`shel|l-comple|
|00001e20| 74 69 6f 6e 2d 65 78 65 | 63 6f 6e 6c 79 27 20 63 |tion-exe|conly' c|
|00001e30| 6f 6e 74 72 6f 6c 73 20 | 74 68 65 20 62 65 68 61 |ontrols |the beha|
|00001e40| 76 69 6f 72 20 6f 66 20 | 63 6f 6d 6d 61 6e 64 20 |vior of |command |
|00001e50| 6e 61 6d 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 2e |name com|pletion.|
|00001e60| 0a 56 61 72 69 61 62 6c | 65 20 60 73 68 65 6c 6c |.Variabl|e `shell|
|00001e70| 2d 63 6f 6d 70 6c 65 74 | 69 6f 6e 2d 66 69 67 6e |-complet|ion-fign|
|00001e80| 6f 72 65 27 20 69 73 20 | 75 73 65 64 20 74 6f 20 |ore' is |used to |
|00001e90| 69 6e 69 74 69 61 6c 69 | 73 65 20 74 68 65 20 76 |initiali|se the v|
|00001ea0| 61 6c 75 65 20 6f 66 0a | 60 63 6f 6d 69 6e 74 2d |alue of.|`comint-|
|00001eb0| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 66 69 67 6e 6f |completi|on-figno|
|00001ec0| 72 65 27 2e 0a 0a 56 61 | 72 69 61 62 6c 65 73 20 |re'...Va|riables |
|00001ed0| 60 63 6f 6d 69 6e 74 2d | 69 6e 70 75 74 2d 72 69 |`comint-|input-ri|
|00001ee0| 6e 67 2d 66 69 6c 65 2d | 6e 61 6d 65 27 20 61 6e |ng-file-|name' an|
|00001ef0| 64 20 60 63 6f 6d 69 6e | 74 2d 69 6e 70 75 74 2d |d `comin|t-input-|
|00001f00| 61 75 74 6f 65 78 70 61 | 6e 64 27 20 63 6f 6e 74 |autoexpa|nd' cont|
|00001f10| 72 6f 6c 0a 74 68 65 20 | 69 6e 69 74 69 61 6c 69 |rol.the |initiali|
|00001f20| 73 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 69 6e |sation o|f the in|
|00001f30| 70 75 74 20 72 69 6e 67 | 20 68 69 73 74 6f 72 79 |put ring| history|
|00001f40| 2c 20 61 6e 64 20 68 69 | 73 74 6f 72 79 20 65 78 |, and hi|story ex|
|00001f50| 70 61 6e 73 69 6f 6e 2e | 0a 0a 56 61 72 69 61 62 |pansion.|..Variab|
|00001f60| 6c 65 73 20 60 63 6f 6d | 69 6e 74 2d 6f 75 74 70 |les `com|int-outp|
|00001f70| 75 74 2d 66 69 6c 74 65 | 72 2d 66 75 6e 63 74 69 |ut-filte|r-functi|
|00001f80| 6f 6e 73 27 2c 20 61 20 | 68 6f 6f 6b 2c 20 61 6e |ons', a |hook, an|
|00001f90| 64 0a 60 63 6f 6d 69 6e | 74 2d 73 63 72 6f 6c 6c |d.`comin|t-scroll|
|00001fa0| 2d 74 6f 2d 62 6f 74 74 | 6f 6d 2d 6f 6e 2d 69 6e |-to-bott|om-on-in|
|00001fb0| 70 75 74 27 20 61 6e 64 | 20 60 63 6f 6d 69 6e 74 |put' and| `comint|
|00001fc0| 2d 73 63 72 6f 6c 6c 2d | 74 6f 2d 62 6f 74 74 6f |-scroll-|to-botto|
|00001fd0| 6d 2d 6f 6e 2d 6f 75 74 | 70 75 74 27 0a 63 6f 6e |m-on-out|put'.con|
|00001fe0| 74 72 6f 6c 20 77 68 65 | 74 68 65 72 20 69 6e 70 |trol whe|ther inp|
|00001ff0| 75 74 20 61 6e 64 20 6f | 75 74 70 75 74 20 63 61 |ut and o|utput ca|
|00002000| 75 73 65 20 74 68 65 20 | 77 69 6e 64 6f 77 20 74 |use the |window t|
|00002010| 6f 20 73 63 72 6f 6c 6c | 20 74 6f 20 74 68 65 20 |o scroll| to the |
|00002020| 65 6e 64 20 6f 66 20 74 | 68 65 0a 62 75 66 66 65 |end of t|he.buffe|
|00002030| 72 2e 22 20 6e 69 6c 5d | 29 0a 28 64 65 66 61 6c |r." nil]|).(defal|
|00002040| 69 61 73 20 27 73 68 65 | 6c 6c 20 23 5b 6e 69 6c |ias 'she|ll #[nil|
|00002050| 20 22 c0 c1 21 84 56 00 | 5c 6e 86 17 00 c3 c4 21 | "..!.V.|\n.....!|
|00002060| 86 17 00 c3 c5 21 86 17 | 00 c6 1e 07 c8 0e 07 21 |.....!..|.......!|
|00002070| 1e 09 ca 0e 09 50 1e 0b | cc cd 0e 09 ce 51 21 1e |.....P..|.....Q!.|
|00002080| 0f d0 d1 d2 0e 07 d3 0e | 0b 21 85 3c 00 0e 0b 0e |........|.!.<....|
|00002090| 0f 83 4e 00 d4 0e 0f 21 | 83 4e 00 0e 0f 4a 82 4f |..N....!|.N...J.O|
|000020a0| 00 d5 25 71 88 d6 20 88 | 2c d7 c1 21 87 22 20 5b |..%q.. .|,..!." [|
|000020b0| 63 6f 6d 69 6e 74 2d 63 | 68 65 63 6b 2d 70 72 6f |comint-c|heck-pro|
|000020c0| 63 20 22 2a 73 68 65 6c | 6c 2a 22 20 65 78 70 6c |c "*shel|l*" expl|
|000020d0| 69 63 69 74 2d 73 68 65 | 6c 6c 2d 66 69 6c 65 2d |icit-she|ll-file-|
|000020e0| 6e 61 6d 65 20 67 65 74 | 65 6e 76 20 22 45 53 48 |name get|env "ESH|
|000020f0| 45 4c 4c 22 20 22 53 48 | 45 4c 4c 22 20 22 2f 62 |ELL" "SH|ELL" "/b|
|00002100| 69 6e 2f 73 68 22 20 70 | 72 6f 67 20 66 69 6c 65 |in/sh" p|rog file|
|00002110| 2d 6e 61 6d 65 2d 6e 6f | 6e 64 69 72 65 63 74 6f |-name-no|ndirecto|
|00002120| 72 79 20 6e 61 6d 65 20 | 22 7e 2f 2e 65 6d 61 63 |ry name |"~/.emac|
|00002130| 73 5f 22 20 73 74 61 72 | 74 66 69 6c 65 20 69 6e |s_" star|tfile in|
|00002140| 74 65 72 6e 2d 73 6f 66 | 74 20 22 65 78 70 6c 69 |tern-sof|t "expli|
|00002150| 63 69 74 2d 22 20 22 2d | 61 72 67 73 22 20 78 61 |cit-" "-|args" xa|
|00002160| 72 67 73 2d 6e 61 6d 65 | 20 61 70 70 6c 79 20 6d |rgs-name| apply m|
|00002170| 61 6b 65 2d 63 6f 6d 69 | 6e 74 20 22 73 68 65 6c |ake-comi|nt "shel|
|00002180| 6c 22 20 66 69 6c 65 2d | 65 78 69 73 74 73 2d 70 |l" file-|exists-p|
|00002190| 20 62 6f 75 6e 64 70 20 | 28 22 2d 69 22 29 20 73 | boundp |("-i") s|
|000021a0| 68 65 6c 6c 2d 6d 6f 64 | 65 20 73 77 69 74 63 68 |hell-mod|e switch|
|000021b0| 2d 74 6f 2d 62 75 66 66 | 65 72 5d 20 37 20 22 5c |-to-buff|er] 7 "\|
|000021c0| 0a 52 75 6e 20 61 6e 20 | 69 6e 66 65 72 69 6f 72 |.Run an |inferior|
|000021d0| 20 73 68 65 6c 6c 2c 20 | 77 69 74 68 20 49 2f 4f | shell, |with I/O|
|000021e0| 20 74 68 72 6f 75 67 68 | 20 62 75 66 66 65 72 20 | through| buffer |
|000021f0| 2a 73 68 65 6c 6c 2a 2e | 0a 49 66 20 62 75 66 66 |*shell*.|.If buff|
|00002200| 65 72 20 65 78 69 73 74 | 73 20 62 75 74 20 73 68 |er exist|s but sh|
|00002210| 65 6c 6c 20 70 72 6f 63 | 65 73 73 20 69 73 20 6e |ell proc|ess is n|
|00002220| 6f 74 20 72 75 6e 6e 69 | 6e 67 2c 20 6d 61 6b 65 |ot runni|ng, make|
|00002230| 20 6e 65 77 20 73 68 65 | 6c 6c 2e 0a 49 66 20 62 | new she|ll..If b|
|00002240| 75 66 66 65 72 20 65 78 | 69 73 74 73 20 61 6e 64 |uffer ex|ists and|
|00002250| 20 73 68 65 6c 6c 20 70 | 72 6f 63 65 73 73 20 69 | shell p|rocess i|
|00002260| 73 20 72 75 6e 6e 69 6e | 67 2c 20 6a 75 73 74 20 |s runnin|g, just |
|00002270| 73 77 69 74 63 68 20 74 | 6f 20 62 75 66 66 65 72 |switch t|o buffer|
|00002280| 20 60 2a 73 68 65 6c 6c | 2a 27 2e 0a 50 72 6f 67 | `*shell|*'..Prog|
|00002290| 72 61 6d 20 75 73 65 64 | 20 63 6f 6d 65 73 20 66 |ram used| comes f|
|000022a0| 72 6f 6d 20 76 61 72 69 | 61 62 6c 65 20 60 65 78 |rom vari|able `ex|
|000022b0| 70 6c 69 63 69 74 2d 73 | 68 65 6c 6c 2d 66 69 6c |plicit-s|hell-fil|
|000022c0| 65 2d 6e 61 6d 65 27 2c | 0a 20 6f 72 20 28 69 66 |e-name',|. or (if|
|000022d0| 20 74 68 61 74 20 69 73 | 20 6e 69 6c 29 20 66 72 | that is| nil) fr|
|000022e0| 6f 6d 20 74 68 65 20 45 | 53 48 45 4c 4c 20 65 6e |om the E|SHELL en|
|000022f0| 76 69 72 6f 6e 6d 65 6e | 74 20 76 61 72 69 61 62 |vironmen|t variab|
|00002300| 6c 65 2c 0a 20 6f 72 20 | 65 6c 73 65 20 66 72 6f |le,. or |else fro|
|00002310| 6d 20 53 48 45 4c 4c 20 | 69 66 20 74 68 65 72 65 |m SHELL |if there|
|00002320| 20 69 73 20 6e 6f 20 45 | 53 48 45 4c 4c 2e 0a 49 | is no E|SHELL..I|
|00002330| 66 20 61 20 66 69 6c 65 | 20 60 7e 2f 2e 65 6d 61 |f a file| `~/.ema|
|00002340| 63 73 5f 53 48 45 4c 4c | 4e 41 4d 45 27 20 65 78 |cs_SHELL|NAME' ex|
|00002350| 69 73 74 73 2c 20 69 74 | 20 69 73 20 67 69 76 65 |ists, it| is give|
|00002360| 6e 20 61 73 20 69 6e 69 | 74 69 61 6c 20 69 6e 70 |n as ini|tial inp|
|00002370| 75 74 0a 20 28 4e 6f 74 | 65 20 74 68 61 74 20 74 |ut. (Not|e that t|
|00002380| 68 69 73 20 6d 61 79 20 | 6c 6f 73 65 20 64 75 65 |his may |lose due|
|00002390| 20 74 6f 20 61 20 74 69 | 6d 69 6e 67 20 65 72 72 | to a ti|ming err|
|000023a0| 6f 72 20 69 66 20 74 68 | 65 20 73 68 65 6c 6c 0a |or if th|e shell.|
|000023b0| 20 20 64 69 73 63 61 72 | 64 73 20 69 6e 70 75 74 | discar|ds input|
|000023c0| 20 77 68 65 6e 20 69 74 | 20 73 74 61 72 74 73 20 | when it| starts |
|000023d0| 75 70 2e 29 0a 54 68 65 | 20 62 75 66 66 65 72 20 |up.).The| buffer |
|000023e0| 69 73 20 70 75 74 20 69 | 6e 20 53 68 65 6c 6c 20 |is put i|n Shell |
|000023f0| 6d 6f 64 65 2c 20 67 69 | 76 69 6e 67 20 63 6f 6d |mode, gi|ving com|
|00002400| 6d 61 6e 64 73 20 66 6f | 72 20 73 65 6e 64 69 6e |mands fo|r sendin|
|00002410| 67 20 69 6e 70 75 74 0a | 61 6e 64 20 63 6f 6e 74 |g input.|and cont|
|00002420| 72 6f 6c 6c 69 6e 67 20 | 74 68 65 20 73 75 62 6a |rolling |the subj|
|00002430| 6f 62 73 20 6f 66 20 74 | 68 65 20 73 68 65 6c 6c |obs of t|he shell|
|00002440| 2e 20 20 53 65 65 20 60 | 73 68 65 6c 6c 2d 6d 6f |. See `|shell-mo|
|00002450| 64 65 27 2e 0a 53 65 65 | 20 61 6c 73 6f 20 74 68 |de'..See| also th|
|00002460| 65 20 76 61 72 69 61 62 | 6c 65 20 60 73 68 65 6c |e variab|le `shel|
|00002470| 6c 2d 70 72 6f 6d 70 74 | 2d 70 61 74 74 65 72 6e |l-prompt|-pattern|
|00002480| 27 2e 0a 0a 54 68 65 20 | 73 68 65 6c 6c 20 66 69 |'...The |shell fi|
|00002490| 6c 65 20 6e 61 6d 65 20 | 28 73 61 6e 73 20 64 69 |le name |(sans di|
|000024a0| 72 65 63 74 6f 72 69 65 | 73 29 20 69 73 20 75 73 |rectorie|s) is us|
|000024b0| 65 64 20 74 6f 20 6d 61 | 6b 65 20 61 20 73 79 6d |ed to ma|ke a sym|
|000024c0| 62 6f 6c 20 6e 61 6d 65 | 0a 73 75 63 68 20 61 73 |bol name|.such as|
|000024d0| 20 60 65 78 70 6c 69 63 | 69 74 2d 63 73 68 2d 61 | `explic|it-csh-a|
|000024e0| 72 67 73 27 2e 20 20 49 | 66 20 74 68 61 74 20 73 |rgs'. I|f that s|
|000024f0| 79 6d 62 6f 6c 20 69 73 | 20 61 20 76 61 72 69 61 |ymbol is| a varia|
|00002500| 62 6c 65 2c 0a 69 74 73 | 20 76 61 6c 75 65 20 69 |ble,.its| value i|
|00002510| 73 20 75 73 65 64 20 61 | 73 20 61 20 6c 69 73 74 |s used a|s a list|
|00002520| 20 6f 66 20 61 72 67 75 | 6d 65 6e 74 73 20 77 68 | of argu|ments wh|
|00002530| 65 6e 20 69 6e 76 6f 6b | 69 6e 67 20 74 68 65 20 |en invok|ing the |
|00002540| 73 68 65 6c 6c 2e 0a 4f | 74 68 65 72 77 69 73 65 |shell..O|therwise|
|00002550| 2c 20 6f 6e 65 20 61 72 | 67 75 6d 65 6e 74 20 60 |, one ar|gument `|
|00002560| 2d 69 27 20 69 73 20 70 | 61 73 73 65 64 20 74 6f |-i' is p|assed to|
|00002570| 20 74 68 65 20 73 68 65 | 6c 6c 2e 0a 0a 28 54 79 | the she|ll...(Ty|
|00002580| 70 65 20 5c 5c 5b 64 65 | 73 63 72 69 62 65 2d 6d |pe \\[de|scribe-m|
|00002590| 6f 64 65 5d 20 69 6e 20 | 74 68 65 20 73 68 65 6c |ode] in |the shel|
|000025a0| 6c 20 62 75 66 66 65 72 | 20 66 6f 72 20 61 20 6c |l buffer| for a l|
|000025b0| 69 73 74 20 6f 66 20 63 | 6f 6d 6d 61 6e 64 73 2e |ist of c|ommands.|
|000025c0| 29 22 20 6e 69 6c 5d 29 | 0a 28 64 65 66 61 6c 69 |)" nil])|.(defali|
|000025d0| 61 73 20 27 73 68 65 6c | 6c 2d 64 69 72 65 63 74 |as 'shel|l-direct|
|000025e0| 6f 72 79 2d 74 72 61 63 | 6b 65 72 20 23 5b 28 73 |ory-trac|ker #[(s|
|000025f0| 74 72 29 20 22 08 85 08 | 00 c1 c2 c3 8f 87 22 20 |tr) "...|......" |
|00002600| 5b 73 68 65 6c 6c 2d 64 | 69 72 74 72 61 63 6b 70 |[shell-d|irtrackp|
|00002610| 20 63 68 64 69 72 2d 66 | 61 69 6c 75 72 65 20 28 | chdir-f|ailure (|
|00002620| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 c1 5c 6e 5c |byte-cod|e "..\n\|
|00002630| 22 88 c3 95 c4 89 89 1d | 1e 06 1e 07 1e 08 c0 0e |".......|........|
|00002640| 09 5c 6e 0e 08 23 85 7d | 00 c3 95 16 07 ca 5c 6e |.\n..#.}|......\n|
|00002650| 0e 08 0e 07 4f c3 89 23 | 16 06 ca 5c 6e 0e 08 0e |....O..#|...\n...|
|00002660| 07 4f cb 89 23 15 c0 0e | 5c 66 0e 06 5c 22 c3 3d |.O..#...|\f..\".=|
|00002670| 83 4a 00 cd ce 0d 21 21 | 88 82 6f 00 c0 0e 0f 0e |.J....!!|..o.....|
|00002680| 06 5c 22 c3 3d 83 5e 00 | d0 ce 0d 21 21 88 82 6f |.\".=.^.|...!!..o|
|00002690| 00 c0 0e 11 0e 06 5c 22 | c3 3d 83 6f 00 d2 ce 0d |......\"|.=.o....|
|000026a0| 21 21 88 c0 d3 5c 6e 0e | 07 23 88 c3 95 16 08 82 |!!...\n.|.#......|
|000026b0| 11 00 2c 87 22 20 5b 73 | 74 72 69 6e 67 2d 6d 61 |..,." [s|tring-ma|
|000026c0| 74 63 68 20 22 5e 5b 3b | 5c 5c 73 20 5d 2a 22 20 |tch "^[;|\\s ]*" |
|000026d0| 73 74 72 20 30 20 6e 69 | 6c 20 61 72 67 31 20 63 |str 0 ni|l arg1 c|
|000026e0| 6d 64 20 65 6e 64 20 73 | 74 61 72 74 20 73 68 65 |md end s|tart she|
|000026f0| 6c 6c 2d 63 6f 6d 6d 61 | 6e 64 2d 72 65 67 65 78 |ll-comma|nd-regex|
|00002700| 70 20 63 6f 6d 69 6e 74 | 2d 61 72 67 75 6d 65 6e |p comint|-argumen|
|00002710| 74 73 20 31 20 73 68 65 | 6c 6c 2d 70 6f 70 64 2d |ts 1 she|ll-popd-|
|00002720| 72 65 67 65 78 70 20 73 | 68 65 6c 6c 2d 70 72 6f |regexp s|hell-pro|
|00002730| 63 65 73 73 2d 70 6f 70 | 64 20 73 75 62 73 74 69 |cess-pop|d substi|
|00002740| 74 75 74 65 2d 69 6e 2d | 66 69 6c 65 2d 6e 61 6d |tute-in-|file-nam|
|00002750| 65 20 73 68 65 6c 6c 2d | 70 75 73 68 64 2d 72 65 |e shell-|pushd-re|
|00002760| 67 65 78 70 20 73 68 65 | 6c 6c 2d 70 72 6f 63 65 |gexp she|ll-proce|
|00002770| 73 73 2d 70 75 73 68 64 | 20 73 68 65 6c 6c 2d 63 |ss-pushd| shell-c|
|00002780| 64 2d 72 65 67 65 78 70 | 20 73 68 65 6c 6c 2d 70 |d-regexp| shell-p|
|00002790| 72 6f 63 65 73 73 2d 63 | 64 20 22 5b 3b 5c 5c 73 |rocess-c|d "[;\\s|
|000027a0| 20 5d 2a 22 5d 20 34 29 | 20 28 28 65 72 72 6f 72 | ]*"] 4)| ((error|
|000027b0| 20 22 43 6f 75 6c 64 6e | 27 74 20 63 64 22 29 29 | "Couldn|'t cd"))|
|000027c0| 5d 20 33 20 22 5c 0a 54 | 72 61 63 6b 73 20 63 64 |] 3 "\.T|racks cd|
|000027d0| 2c 20 70 75 73 68 64 20 | 61 6e 64 20 70 6f 70 64 |, pushd |and popd|
|000027e0| 20 63 6f 6d 6d 61 6e 64 | 73 20 69 73 73 75 65 64 | command|s issued|
|000027f0| 20 74 6f 20 74 68 65 20 | 73 68 65 6c 6c 2e 0a 54 | to the |shell..T|
|00002800| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 69 73 20 |his func|tion is |
|00002810| 63 61 6c 6c 65 64 20 6f | 6e 20 65 61 63 68 20 69 |called o|n each i|
|00002820| 6e 70 75 74 20 70 61 73 | 73 65 64 20 74 6f 20 74 |nput pas|sed to t|
|00002830| 68 65 20 73 68 65 6c 6c | 2e 0a 49 74 20 77 61 74 |he shell|..It wat|
|00002840| 63 68 65 73 20 66 6f 72 | 20 63 64 2c 20 70 75 73 |ches for| cd, pus|
|00002850| 68 64 20 61 6e 64 20 70 | 6f 70 64 20 63 6f 6d 6d |hd and p|opd comm|
|00002860| 61 6e 64 73 20 61 6e 64 | 20 73 65 74 73 20 74 68 |ands and| sets th|
|00002870| 65 20 62 75 66 66 65 72 | 27 73 0a 64 65 66 61 75 |e buffer|'s.defau|
|00002880| 6c 74 20 64 69 72 65 63 | 74 6f 72 79 20 74 6f 20 |lt direc|tory to |
|00002890| 74 72 61 63 6b 20 74 68 | 65 73 65 20 63 6f 6d 6d |track th|ese comm|
|000028a0| 61 6e 64 73 2e 0a 0a 59 | 6f 75 20 6d 61 79 20 74 |ands...Y|ou may t|
|000028b0| 6f 67 67 6c 65 20 74 68 | 69 73 20 74 72 61 63 6b |oggle th|is track|
|000028c0| 69 6e 67 20 6f 6e 20 61 | 6e 64 20 6f 66 66 20 77 |ing on a|nd off w|
|000028d0| 69 74 68 20 4d 2d 78 20 | 64 69 72 74 72 61 63 6b |ith M-x |dirtrack|
|000028e0| 2d 74 6f 67 67 6c 65 2e | 0a 49 66 20 65 6d 61 63 |-toggle.|.If emac|
|000028f0| 73 20 67 65 74 73 20 63 | 6f 6e 66 75 73 65 64 2c |s gets c|onfused,|
|00002900| 20 79 6f 75 20 63 61 6e | 20 72 65 73 79 6e 63 20 | you can| resync |
|00002910| 77 69 74 68 20 74 68 65 | 20 73 68 65 6c 6c 20 77 |with the| shell w|
|00002920| 69 74 68 20 4d 2d 78 20 | 64 69 72 73 2e 0a 0a 53 |ith M-x |dirs...S|
|00002930| 65 65 20 76 61 72 69 61 | 62 6c 65 73 20 60 73 68 |ee varia|bles `sh|
|00002940| 65 6c 6c 2d 63 64 2d 72 | 65 67 65 78 70 27 2c 20 |ell-cd-r|egexp', |
|00002950| 60 73 68 65 6c 6c 2d 70 | 75 73 68 64 2d 72 65 67 |`shell-p|ushd-reg|
|00002960| 65 78 70 27 2c 20 61 6e | 64 20 60 73 68 65 6c 6c |exp', an|d `shell|
|00002970| 2d 70 6f 70 64 2d 72 65 | 67 65 78 70 27 2c 0a 77 |-popd-re|gexp',.w|
|00002980| 68 69 6c 65 20 60 73 68 | 65 6c 6c 2d 70 75 73 68 |hile `sh|ell-push|
|00002990| 64 2d 74 6f 68 6f 6d 65 | 27 2c 20 60 73 68 65 6c |d-tohome|', `shel|
|000029a0| 6c 2d 70 75 73 68 64 2d | 64 65 78 74 72 61 63 74 |l-pushd-|dextract|
|000029b0| 27 20 61 6e 64 20 60 73 | 68 65 6c 6c 2d 70 75 73 |' and `s|hell-pus|
|000029c0| 68 64 2d 64 75 6e 69 71 | 75 65 27 0a 63 6f 6e 74 |hd-duniq|ue'.cont|
|000029d0| 72 6f 6c 20 74 68 65 20 | 62 65 68 61 76 69 6f 72 |rol the |behavior|
|000029e0| 20 6f 66 20 74 68 65 20 | 72 65 6c 65 76 61 6e 74 | of the |relevant|
|000029f0| 20 63 6f 6d 6d 61 6e 64 | 2e 0a 0a 45 6e 76 69 72 | command|...Envir|
|00002a00| 6f 6e 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 73 |onment v|ariables|
|00002a10| 20 61 72 65 20 65 78 70 | 61 6e 64 65 64 2c 20 73 | are exp|anded, s|
|00002a20| 65 65 20 66 75 6e 63 74 | 69 6f 6e 20 60 73 75 62 |ee funct|ion `sub|
|00002a30| 73 74 69 74 75 74 65 2d | 69 6e 2d 66 69 6c 65 2d |stitute-|in-file-|
|00002a40| 6e 61 6d 65 27 2e 22 5d | 29 0a 28 62 79 74 65 2d |name'."]|).(byte-|
|00002a50| 63 6f 64 65 20 22 c0 c1 | c2 5c 22 88 c0 c3 c4 5c |code "..|.\"....\|
|00002a60| 22 88 c0 c5 c6 5c 22 88 | c0 c7 c8 5c 22 88 c0 c9 |"....\".|...\"...|
|00002a70| ca 5c 22 87 22 20 5b 64 | 65 66 61 6c 69 61 73 20 |.\"." [d|efalias |
|00002a80| 73 68 65 6c 6c 2d 70 72 | 6f 63 65 73 73 2d 70 6f |shell-pr|ocess-po|
|00002a90| 70 64 20 23 5b 28 61 72 | 67 29 20 22 c0 09 21 86 |pd #[(ar|g) "..!.|
|00002aa0| 07 00 c2 89 1b 83 23 00 | 0b c2 55 83 23 00 5c 66 |......#.|..U.#.\f|
|00002ab0| 83 23 00 c5 5c 66 40 21 | 88 5c 66 41 14 c6 20 82 |.#..\f@!|.\fA.. .|
|00002ac0| 53 00 0b 83 50 00 0b c2 | 56 83 50 00 0b 5c 66 47 |S...P...|V.P..\fG|
|00002ad0| 58 83 50 00 c7 5c 66 42 | 1e 08 0b 53 0e 08 9b 89 |X.P..\fB|...S....|
|00002ae0| 1e 09 89 41 41 a1 88 0e | 08 41 14 c6 20 2a 82 53 |...AA...|.A.. *.S|
|00002af0| 00 ca cb 21 29 87 22 20 | 5b 73 68 65 6c 6c 2d 65 |...!)." |[shell-e|
|00002b00| 78 74 72 61 63 74 2d 6e | 75 6d 20 61 72 67 20 30 |xtract-n|um arg 0|
|00002b10| 20 6e 75 6d 20 73 68 65 | 6c 6c 2d 64 69 72 73 74 | num she|ll-dirst|
|00002b20| 61 63 6b 20 63 64 20 73 | 68 65 6c 6c 2d 64 69 72 |ack cd s|hell-dir|
|00002b30| 73 74 61 63 6b 2d 6d 65 | 73 73 61 67 65 20 6e 69 |stack-me|ssage ni|
|00002b40| 6c 20 64 73 20 63 65 6c | 6c 20 65 72 72 6f 72 20 |l ds cel|l error |
|00002b50| 22 43 6f 75 6c 64 6e 27 | 74 20 70 6f 70 64 22 5d |"Couldn'|t popd"]|
|00002b60| 20 33 5d 20 73 68 65 6c | 6c 2d 70 72 65 66 69 78 | 3] shel|l-prefix|
|00002b70| 65 64 2d 64 69 72 65 63 | 74 6f 72 79 2d 6e 61 6d |ed-direc|tory-nam|
|00002b80| 65 20 23 5b 28 64 69 72 | 29 20 22 08 47 c1 55 83 |e #[(dir|) ".G.U.|
|00002b90| 09 00 5c 6e 87 c3 5c 6e | 21 83 13 00 08 5c 6e 50 |..\n..\n|!....\nP|
|00002ba0| 87 c4 5c 6e 21 87 22 20 | 5b 63 6f 6d 69 6e 74 2d |..\n!." |[comint-|
|00002bb0| 66 69 6c 65 2d 6e 61 6d | 65 2d 70 72 65 66 69 78 |file-nam|e-prefix|
|00002bc0| 20 30 20 64 69 72 20 66 | 69 6c 65 2d 6e 61 6d 65 | 0 dir f|ile-name|
|00002bd0| 2d 61 62 73 6f 6c 75 74 | 65 2d 70 20 65 78 70 61 |-absolut|e-p expa|
|00002be0| 6e 64 2d 66 69 6c 65 2d | 6e 61 6d 65 5d 20 32 5d |nd-file-|name] 2]|
|00002bf0| 20 73 68 65 6c 6c 2d 70 | 72 6f 63 65 73 73 2d 63 | shell-p|rocess-c|
|00002c00| 64 20 23 5b 28 61 72 67 | 29 20 22 08 47 c1 55 83 |d #[(arg|) ".G.U.|
|00002c10| 0d 00 5c 6e c3 50 82 1a | 00 08 c4 98 83 17 00 0d |..\n.P..|........|
|00002c20| 82 1a 00 c6 08 21 1e 07 | 0e 08 15 c9 0e 07 21 88 |.....!..|......!.|
|00002c30| ca 20 29 87 22 20 5b 61 | 72 67 20 30 20 63 6f 6d |. )." [a|rg 0 com|
|00002c40| 69 6e 74 2d 66 69 6c 65 | 2d 6e 61 6d 65 2d 70 72 |int-file|-name-pr|
|00002c50| 65 66 69 78 20 22 7e 22 | 20 22 2d 22 20 73 68 65 |efix "~"| "-" she|
|00002c60| 6c 6c 2d 6c 61 73 74 2d | 64 69 72 20 73 68 65 6c |ll-last-|dir shel|
|00002c70| 6c 2d 70 72 65 66 69 78 | 65 64 2d 64 69 72 65 63 |l-prefix|ed-direc|
|00002c80| 74 6f 72 79 2d 6e 61 6d | 65 20 6e 65 77 2d 64 69 |tory-nam|e new-di|
|00002c90| 72 20 64 65 66 61 75 6c | 74 2d 64 69 72 65 63 74 |r defaul|t-direct|
|00002ca0| 6f 72 79 20 63 64 20 73 | 68 65 6c 6c 2d 64 69 72 |ory cd s|hell-dir|
|00002cb0| 73 74 61 63 6b 2d 6d 65 | 73 73 61 67 65 5d 20 32 |stack-me|ssage] 2|
|00002cc0| 5d 20 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d |] shell-|process-|
|00002cd0| 70 75 73 68 64 20 23 5b | 28 61 72 67 29 20 22 c0 |pushd #[|(arg) ".|
|00002ce0| 09 21 1a 09 47 c3 55 83 | 3b 00 5c 66 83 18 00 c5 |.!..G.U.|;.\f....|
|00002cf0| 0e 06 c7 50 21 82 d4 00 | 0e 08 83 35 00 0e 09 1e |...P!...|...5....|
|00002d00| 5c 6e cb 0e 08 40 21 88 | 0e 5c 6e 0e 08 41 42 16 |\n...@!.|.\n..AB.|
|00002d10| 08 cc 20 29 82 d4 00 cd | ce 21 82 d4 00 5c 6e a7 |.. )....|.!...\n.|
|00002d20| 83 b3 00 5c 6e 0e 08 47 | 56 83 4e 00 cd cf 21 82 |...\n..G|V.N...!.|
|00002d30| d4 00 5c 6e c3 55 83 5c | 5c 00 d0 cd d1 21 21 82 |..\n.U.\|\....!!.|
|00002d40| d4 00 0e 12 83 7c 00 5c | 6e 53 0e 08 38 1e 13 d4 |.....|.\|nS..8...|
|00002d50| 09 21 88 c5 0e 09 21 88 | cb 0e 13 21 88 cc 20 29 |.!....!.|...!.. )|
|00002d60| 82 d4 00 0e 09 0e 08 42 | 89 1e 15 47 1e 16 5c 6e |.......B|...G..\n|
|00002d70| 0e 15 9b 1e 17 d8 0e 16 | 5c 6e 5a d8 0e 15 21 9b |........|\nZ...!.|
|00002d80| 21 1e 19 da 0e 17 0e 19 | 5c 22 1e 1b cb 0e 1b 40 |!.......|\".....@|
|00002d90| 21 88 0e 1b 41 16 08 cc | 20 2d 82 d4 00 0e 09 1e |!...A...| -......|
|00002da0| 1c cb dd 09 21 21 88 0e | 1e 83 ca 00 0e 1c 0e 08 |....!!..|........|
|00002db0| 9d 84 d1 00 0e 1c 0e 08 | 42 16 08 cc 20 29 29 87 |........|B... )).|
|00002dc0| 22 20 5b 73 68 65 6c 6c | 2d 65 78 74 72 61 63 74 |" [shell|-extract|
|00002dd0| 2d 6e 75 6d 20 61 72 67 | 20 6e 75 6d 20 30 20 73 |-num arg| num 0 s|
|00002de0| 68 65 6c 6c 2d 70 75 73 | 68 64 2d 74 6f 68 6f 6d |hell-pus|hd-tohom|
|00002df0| 65 20 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d |e shell-|process-|
|00002e00| 70 75 73 68 64 20 63 6f | 6d 69 6e 74 2d 66 69 6c |pushd co|mint-fil|
|00002e10| 65 2d 6e 61 6d 65 2d 70 | 72 65 66 69 78 20 22 7e |e-name-p|refix "~|
|00002e20| 22 20 73 68 65 6c 6c 2d | 64 69 72 73 74 61 63 6b |" shell-|dirstack|
|00002e30| 20 64 65 66 61 75 6c 74 | 2d 64 69 72 65 63 74 6f | default|-directo|
|00002e40| 72 79 20 6f 6c 64 20 63 | 64 20 73 68 65 6c 6c 2d |ry old c|d shell-|
|00002e50| 64 69 72 73 74 61 63 6b | 2d 6d 65 73 73 61 67 65 |dirstack|-message|
|00002e60| 20 6d 65 73 73 61 67 65 | 20 22 44 69 72 65 63 74 | message| "Direct|
|00002e70| 6f 72 79 20 73 74 61 63 | 6b 20 65 6d 70 74 79 2e |ory stac|k empty.|
|00002e80| 22 20 22 44 69 72 65 63 | 74 6f 72 79 20 73 74 61 |" "Direc|tory sta|
|00002e90| 63 6b 20 6e 6f 74 20 74 | 68 61 74 20 64 65 65 70 |ck not t|hat deep|
|00002ea0| 2e 22 20 65 72 72 6f 72 | 20 22 43 6f 75 6c 64 6e |." error| "Couldn|
|00002eb0| 27 74 20 63 64 2e 22 20 | 73 68 65 6c 6c 2d 70 75 |'t cd." |shell-pu|
|00002ec0| 73 68 64 2d 64 65 78 74 | 72 61 63 74 20 64 69 72 |shd-dext|ract dir|
|00002ed0| 20 73 68 65 6c 6c 2d 70 | 72 6f 63 65 73 73 2d 70 | shell-p|rocess-p|
|00002ee0| 6f 70 64 20 64 73 20 64 | 73 6c 65 6e 20 66 72 6f |opd ds d|slen fro|
|00002ef0| 6e 74 20 72 65 76 65 72 | 73 65 20 62 61 63 6b 20 |nt rever|se back |
|00002f00| 61 70 70 65 6e 64 20 6e | 65 77 2d 64 73 20 6f 6c |append n|ew-ds ol|
|00002f10| 64 2d 77 64 20 73 68 65 | 6c 6c 2d 70 72 65 66 69 |d-wd she|ll-prefi|
|00002f20| 78 65 64 2d 64 69 72 65 | 63 74 6f 72 79 2d 6e 61 |xed-dire|ctory-na|
|00002f30| 6d 65 20 73 68 65 6c 6c | 2d 70 75 73 68 64 2d 64 |me shell|-pushd-d|
|00002f40| 75 6e 69 71 75 65 5d 20 | 35 5d 20 73 68 65 6c 6c |unique] |5] shell|
|00002f50| 2d 65 78 74 72 61 63 74 | 2d 6e 75 6d 20 23 5b 28 |-extract|-num #[(|
|00002f60| 73 74 72 29 20 22 c0 c1 | 5c 6e 5c 22 85 5c 6e 00 |str) "..|\n\".\n.|
|00002f70| c3 5c 6e 21 87 22 20 5b | 73 74 72 69 6e 67 2d 6d |.\n!." [|string-m|
|00002f80| 61 74 63 68 20 22 5e 5c | 5c 2b 5b 31 2d 39 5d 5b |atch "^\|\+[1-9][|
|00002f90| 30 2d 39 5d 2a 24 22 20 | 73 74 72 20 73 74 72 69 |0-9]*$" |str stri|
|00002fa0| 6e 67 2d 74 6f 2d 69 6e | 74 5d 20 33 5d 5d 20 33 |ng-to-in|t] 3]] 3|
|00002fb0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 68 65 |).(defal|ias 'she|
|00002fc0| 6c 6c 2d 64 69 72 74 72 | 61 63 6b 2d 74 6f 67 67 |ll-dirtr|ack-togg|
|00002fd0| 6c 65 20 23 5b 6e 69 6c | 20 22 08 3f 10 c1 c2 08 |le #[nil| ".?....|
|00002fe0| 83 0d 00 c3 82 0e 00 c4 | 5c 22 87 22 20 5b 73 68 |........|\"." [sh|
|00002ff0| 65 6c 6c 2d 64 69 72 74 | 72 61 63 6b 70 20 6d 65 |ell-dirt|rackp me|
|00003000| 73 73 61 67 65 20 22 44 | 69 72 65 63 74 6f 72 79 |ssage "D|irectory|
|00003010| 20 74 72 61 63 6b 69 6e | 67 20 25 73 22 20 22 4f | trackin|g %s" "O|
|00003020| 4e 22 20 22 4f 46 46 22 | 5d 20 33 20 22 5c 0a 54 |N" "OFF"|] 3 "\.T|
|00003030| 75 72 6e 20 64 69 72 65 | 63 74 6f 72 79 20 74 72 |urn dire|ctory tr|
|00003040| 61 63 6b 69 6e 67 20 6f | 6e 20 61 6e 64 20 6f 66 |acking o|n and of|
|00003050| 66 20 69 6e 20 61 20 73 | 68 65 6c 6c 20 62 75 66 |f in a s|hell buf|
|00003060| 66 65 72 2e 22 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |fer." ni|l]).(def|
|00003070| 61 6c 69 61 73 20 28 71 | 75 6f 74 65 20 64 69 72 |alias (q|uote dir|
|00003080| 74 72 61 63 6b 2d 74 6f | 67 67 6c 65 29 20 28 71 |track-to|ggle) (q|
|00003090| 75 6f 74 65 20 73 68 65 | 6c 6c 2d 64 69 72 74 72 |uote she|ll-dirtr|
|000030a0| 61 63 6b 2d 74 6f 67 67 | 6c 65 29 29 0a 28 64 65 |ack-togg|le)).(de|
|000030b0| 66 61 6c 69 61 73 20 27 | 73 68 65 6c 6c 2d 72 65 |falias '|shell-re|
|000030c0| 73 79 6e 63 2d 64 69 72 | 73 20 23 5b 6e 69 6c 20 |sync-dir|s #[nil |
|000030d0| 22 c0 70 21 19 c2 09 21 | 89 1b 62 88 5c 66 63 88 |".p!...!|..b.\fc.|
|000030e0| c5 63 88 c6 c7 21 88 c8 | 09 5c 66 5c 22 88 c8 09 |.c...!..|.\f\"...|
|000030f0| c5 5c 22 88 0b 60 c9 93 | 88 60 1e 5c 6e c5 63 88 |.\"..`..|.`.\n.c.|
|00003100| cb cc 21 88 cd ce 21 84 | 3f 00 cf 09 21 88 0e 5c |..!...!.|?...!..\|
|00003110| 6e 62 88 82 2e 00 29 0b | 62 88 d0 cc 21 88 c7 94 |nb....).|b...!...|
|00003120| c7 95 53 7b 89 1e 11 47 | 1e 12 c9 1e 13 c7 1e 14 |..S{...G|........|
|00003130| c7 0e 12 57 83 7f 00 d5 | d6 0e 11 0e 14 23 88 0e |...W....|.....#..|
|00003140| 17 0e 11 cc 94 cc 95 4f | 50 0e 13 42 16 13 c7 95 |.......O|P..B....|
|00003150| 89 16 14 82 5a 00 0e 13 | 9f 1e 13 c9 d8 d9 8f 2e |....Z...|........|
|00003160| 07 87 22 20 5b 67 65 74 | 2d 62 75 66 66 65 72 2d |.." [get|-buffer-|
|00003170| 70 72 6f 63 65 73 73 20 | 70 72 6f 63 20 70 72 6f |process |proc pro|
|00003180| 63 65 73 73 2d 6d 61 72 | 6b 20 70 6d 61 72 6b 20 |cess-mar|k pmark |
|00003190| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 2d 71 |shell-di|rstack-q|
|000031a0| 75 65 72 79 20 22 5c 6e | 22 20 73 69 74 2d 66 6f |uery "\n|" sit-fo|
|000031b0| 72 20 30 20 63 6f 6d 69 | 6e 74 2d 73 65 6e 64 2d |r 0 comi|nt-send-|
|000031c0| 73 74 72 69 6e 67 20 6e | 69 6c 20 70 74 20 62 61 |string n|il pt ba|
|000031d0| 63 6b 77 61 72 64 2d 63 | 68 61 72 20 31 20 6c 6f |ckward-c|har 1 lo|
|000031e0| 6f 6b 69 6e 67 2d 61 74 | 20 22 2e 2b 5c 6e 22 20 |oking-at| ".+\n" |
|000031f0| 61 63 63 65 70 74 2d 70 | 72 6f 63 65 73 73 2d 6f |accept-p|rocess-o|
|00003200| 75 74 70 75 74 20 64 65 | 6c 65 74 65 2d 63 68 61 |utput de|lete-cha|
|00003210| 72 20 64 6c 20 64 6c 2d | 6c 65 6e 20 64 73 20 69 |r dl dl-|len ds i|
|00003220| 20 73 74 72 69 6e 67 2d | 6d 61 74 63 68 20 22 5c | string-|match "\|
|00003230| 5c 73 20 2a 5c 5c 28 5c | 5c 53 20 2b 5c 5c 29 5c |\s *\\(\|\S +\\)\|
|00003240| 5c 73 20 2a 22 20 63 6f | 6d 69 6e 74 2d 66 69 6c |\s *" co|mint-fil|
|00003250| 65 2d 6e 61 6d 65 2d 70 | 72 65 66 69 78 20 28 62 |e-name-p|refix (b|
|00003260| 79 74 65 2d 63 6f 64 65 | 20 22 c0 09 40 21 88 09 |yte-code| "..@!..|
|00003270| 41 12 c3 20 87 22 20 5b | 63 64 20 64 73 20 73 68 |A.. ." [|cd ds sh|
|00003280| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 20 73 68 65 |ell-dirs|tack she|
|00003290| 6c 6c 2d 64 69 72 73 74 | 61 63 6b 2d 6d 65 73 73 |ll-dirst|ack-mess|
|000032a0| 61 67 65 5d 20 32 29 20 | 28 28 65 72 72 6f 72 20 |age] 2) |((error |
|000032b0| 28 6d 65 73 73 61 67 65 | 20 22 43 6f 75 6c 64 6e |(message| "Couldn|
|000032c0| 27 74 20 63 64 2e 22 29 | 29 29 5d 20 35 20 22 5c |'t cd.")|))] 5 "\|
|000032d0| 0a 52 65 73 79 6e 63 20 | 74 68 65 20 62 75 66 66 |.Resync |the buff|
|000032e0| 65 72 27 73 20 69 64 65 | 61 20 6f 66 20 74 68 65 |er's ide|a of the|
|000032f0| 20 63 75 72 72 65 6e 74 | 20 64 69 72 65 63 74 6f | current| directo|
|00003300| 72 79 20 73 74 61 63 6b | 2e 0a 54 68 69 73 20 63 |ry stack|..This c|
|00003310| 6f 6d 6d 61 6e 64 20 71 | 75 65 72 69 65 73 20 74 |ommand q|ueries t|
|00003320| 68 65 20 73 68 65 6c 6c | 20 77 69 74 68 20 74 68 |he shell| with th|
|00003330| 65 20 63 6f 6d 6d 61 6e | 64 20 62 6f 75 6e 64 20 |e comman|d bound |
|00003340| 74 6f 20 0a 60 73 68 65 | 6c 6c 2d 64 69 72 73 74 |to .`she|ll-dirst|
|00003350| 61 63 6b 2d 71 75 65 72 | 79 27 20 28 64 65 66 61 |ack-quer|y' (defa|
|00003360| 75 6c 74 20 5c 22 64 69 | 72 73 5c 22 29 2c 20 72 |ult \"di|rs\"), r|
|00003370| 65 61 64 73 20 74 68 65 | 20 6e 65 78 74 0a 6c 69 |eads the| next.li|
|00003380| 6e 65 20 6f 75 74 70 75 | 74 20 61 6e 64 20 70 61 |ne outpu|t and pa|
|00003390| 72 73 65 73 20 69 74 20 | 74 6f 20 66 6f 72 6d 20 |rses it |to form |
|000033a0| 74 68 65 20 6e 65 77 20 | 64 69 72 65 63 74 6f 72 |the new |director|
|000033b0| 79 20 73 74 61 63 6b 2e | 0a 44 4f 4e 27 54 20 69 |y stack.|.DON'T i|
|000033c0| 73 73 75 65 20 74 68 69 | 73 20 63 6f 6d 6d 61 6e |ssue thi|s comman|
|000033d0| 64 20 75 6e 6c 65 73 73 | 20 74 68 65 20 62 75 66 |d unless| the buf|
|000033e0| 66 65 72 20 69 73 20 61 | 74 20 61 20 73 68 65 6c |fer is a|t a shel|
|000033f0| 6c 20 70 72 6f 6d 70 74 | 2e 0a 41 6c 73 6f 2c 20 |l prompt|..Also, |
|00003400| 6e 6f 74 65 20 74 68 61 | 74 20 69 66 20 73 6f 6d |note tha|t if som|
|00003410| 65 20 6f 74 68 65 72 20 | 73 75 62 70 72 6f 63 65 |e other |subproce|
|00003420| 73 73 20 64 65 63 69 64 | 65 73 20 74 6f 20 64 6f |ss decid|es to do|
|00003430| 20 6f 75 74 70 75 74 0a | 69 6d 6d 65 64 69 61 74 | output.|immediat|
|00003440| 65 6c 79 20 61 66 74 65 | 72 20 74 68 65 20 71 75 |ely afte|r the qu|
|00003450| 65 72 79 2c 20 69 74 73 | 20 6f 75 74 70 75 74 20 |ery, its| output |
|00003460| 77 69 6c 6c 20 62 65 20 | 74 61 6b 65 6e 20 61 73 |will be |taken as|
|00003470| 20 74 68 65 0a 6e 65 77 | 20 64 69 72 65 63 74 6f | the.new| directo|
|00003480| 72 79 20 73 74 61 63 6b | 20 2d 2d 20 79 6f 75 20 |ry stack| -- you |
|00003490| 6c 6f 73 65 2e 20 49 66 | 20 74 68 69 73 20 68 61 |lose. If| this ha|
|000034a0| 70 70 65 6e 73 2c 20 6a | 75 73 74 20 64 6f 20 74 |ppens, j|ust do t|
|000034b0| 68 65 0a 63 6f 6d 6d 61 | 6e 64 20 61 67 61 69 6e |he.comma|nd again|
|000034c0| 2e 22 20 6e 69 6c 5d 29 | 0a 28 62 79 74 65 2d 63 |." nil])|.(byte-c|
|000034d0| 6f 64 65 20 22 c0 c1 c2 | 5c 22 88 c0 c3 c4 5c 22 |ode "...|\"....\"|
|000034e0| 87 22 20 5b 64 65 66 61 | 6c 69 61 73 20 64 69 72 |." [defa|lias dir|
|000034f0| 73 20 73 68 65 6c 6c 2d | 72 65 73 79 6e 63 2d 64 |s shell-|resync-d|
|00003500| 69 72 73 20 73 68 65 6c | 6c 2d 64 69 72 73 74 61 |irs shel|l-dirsta|
|00003510| 63 6b 2d 6d 65 73 73 61 | 67 65 20 23 5b 6e 69 6c |ck-messa|ge #[nil|
|00003520| 20 22 c0 19 5c 6e 0b 42 | 1c c5 0e 06 c7 50 21 89 | "..\n.B|.....P!.|
|00003530| 1e 08 47 1e 09 5c 66 83 | 75 00 5c 66 40 89 1e 5c |..G..\f.|u.\f@..\|
|00003540| 6e 47 0e 09 59 83 38 00 | 0e 08 0e 5c 6e cb 0e 09 |nG..Y.8.|...\n...|
|00003550| 4f 98 83 38 00 c7 0e 5c | 6e 0e 09 cc 4f 50 16 5c |O..8...\|n...OP.\|
|00003560| 6e 0e 06 83 66 00 0e 5c | 6e 47 0e 06 47 59 83 66 |n...f..\|nG..GY.f|
|00003570| 00 0e 06 0e 5c 6e cb 0e | 06 47 4f 98 83 66 00 0e |....\n..|.GO..f..|
|00003580| 5c 6e 0e 06 47 cc 4f 89 | 16 5c 6e 83 66 00 5c 66 |\n..G.O.|.\n.f.\f|
|00003590| 0e 5c 6e a0 88 09 cd 0e | 5c 6e 21 ce 51 11 5c 66 |.\n.....|\n!.Q.\f|
|000035a0| 41 14 29 82 12 00 cf 09 | 21 2c 87 22 20 5b 22 22 |A.).....|!,." [""|
|000035b0| 20 6d 73 67 20 64 65 66 | 61 75 6c 74 2d 64 69 72 | msg def|ault-dir|
|000035c0| 65 63 74 6f 72 79 20 73 | 68 65 6c 6c 2d 64 69 72 |ectory s|hell-dir|
|000035d0| 73 74 61 63 6b 20 64 73 | 20 65 78 70 61 6e 64 2d |stack ds| expand-|
|000035e0| 66 69 6c 65 2d 6e 61 6d | 65 20 63 6f 6d 69 6e 74 |file-nam|e comint|
|000035f0| 2d 66 69 6c 65 2d 6e 61 | 6d 65 2d 70 72 65 66 69 |-file-na|me-prefi|
|00003600| 78 20 22 7e 2f 22 20 68 | 6f 6d 65 20 68 6f 6d 65 |x "~/" h|ome home|
|00003610| 6c 65 6e 20 64 69 72 20 | 30 20 6e 69 6c 20 64 69 |len dir |0 nil di|
|00003620| 72 65 63 74 6f 72 79 2d | 66 69 6c 65 2d 6e 61 6d |rectory-|file-nam|
|00003630| 65 20 22 20 22 20 6d 65 | 73 73 61 67 65 5d 20 35 |e " " me|ssage] 5|
|00003640| 5d 5d 20 33 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |]] 3).(d|efalias |
|00003650| 27 73 68 65 6c 6c 2d 66 | 6f 72 77 61 72 64 2d 63 |'shell-f|orward-c|
|00003660| 6f 6d 6d 61 6e 64 20 23 | 5b 28 26 6f 70 74 69 6f |ommand #|[(&optio|
|00003670| 6e 61 6c 20 61 72 67 29 | 20 22 8a c0 7f 88 60 29 |nal arg)| "....`)|
|00003680| 19 c2 0b c4 50 09 c5 0e | 06 24 85 16 00 c7 c8 21 |....P...|.$.....!|
|00003690| 29 87 22 20 5b 6e 69 6c | 20 6c 69 6d 69 74 20 72 |)." [nil| limit r|
|000036a0| 65 2d 73 65 61 72 63 68 | 2d 66 6f 72 77 61 72 64 |e-search|-forward|
|000036b0| 20 73 68 65 6c 6c 2d 63 | 6f 6d 6d 61 6e 64 2d 72 | shell-c|ommand-r|
|000036c0| 65 67 65 78 70 20 22 5c | 5c 28 5b 3b 26 7c 5d 5b |egexp "\|\([;&|][|
|000036d0| 09 20 5d 2a 5c 5c 29 2b | 22 20 6d 6f 76 65 20 61 |. ]*\\)+|" move a|
|000036e0| 72 67 20 73 6b 69 70 2d | 73 79 6e 74 61 78 2d 62 |rg skip-|syntax-b|
|000036f0| 61 63 6b 77 61 72 64 20 | 22 20 22 5d 20 35 20 22 |ackward |" "] 5 "|
|00003700| 5c 0a 4d 6f 76 65 20 66 | 6f 72 77 61 72 64 20 61 |\.Move f|orward a|
|00003710| 63 72 6f 73 73 20 41 52 | 47 20 73 68 65 6c 6c 20 |cross AR|G shell |
|00003720| 63 6f 6d 6d 61 6e 64 28 | 73 29 2e 20 20 44 6f 65 |command(|s). Doe|
|00003730| 73 20 6e 6f 74 20 63 72 | 6f 73 73 20 6c 69 6e 65 |s not cr|oss line|
|00003740| 73 2e 0a 53 65 65 20 60 | 73 68 65 6c 6c 2d 63 6f |s..See `|shell-co|
|00003750| 6d 6d 61 6e 64 2d 72 65 | 67 65 78 70 27 2e 22 20 |mmand-re|gexp'." |
|00003760| 22 70 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |"p"]).(d|efalias |
|00003770| 27 73 68 65 6c 6c 2d 62 | 61 63 6b 77 61 72 64 2d |'shell-b|ackward-|
|00003780| 63 6f 6d 6d 61 6e 64 20 | 23 5b 28 26 6f 70 74 69 |command |#[(&opti|
|00003790| 6f 6e 61 6c 20 61 72 67 | 29 20 22 8a c0 c1 21 88 |onal arg|) "...!.|
|000037a0| 60 29 89 1a 60 56 83 15 | 00 8a c3 79 88 60 12 29 |`)..`V..|...y.`.)|
|000037b0| c4 c5 5c 6e 5c 22 88 c6 | c7 c8 0e 09 5c 22 5c 6e |..\n\"..|....\"\n|
|000037c0| ca 0e 0b 24 85 2f 00 cc | 94 62 88 cd c1 77 29 87 |...$./..|.b...w).|
|000037d0| 22 20 5b 63 6f 6d 69 6e | 74 2d 62 6f 6c 20 6e 69 |" [comin|t-bol ni|
|000037e0| 6c 20 6c 69 6d 69 74 20 | 30 20 73 6b 69 70 2d 73 |l limit |0 skip-s|
|000037f0| 79 6e 74 61 78 2d 62 61 | 63 6b 77 61 72 64 20 22 |yntax-ba|ckward "|
|00003800| 20 22 20 72 65 2d 73 65 | 61 72 63 68 2d 62 61 63 | " re-se|arch-bac|
|00003810| 6b 77 61 72 64 20 66 6f | 72 6d 61 74 20 22 5b 3b |kward fo|rmat "[;|
|00003820| 26 7c 5d 2b 5b 09 20 5d | 2a 5c 5c 28 25 73 5c 5c |&|]+[. ]|*\\(%s\\|
|00003830| 29 22 20 73 68 65 6c 6c | 2d 63 6f 6d 6d 61 6e 64 |)" shell|-command|
|00003840| 2d 72 65 67 65 78 70 20 | 6d 6f 76 65 20 61 72 67 |-regexp |move arg|
|00003850| 20 31 20 22 3b 26 7c 22 | 5d 20 36 20 22 5c 0a 4d | 1 ";&|"|] 6 "\.M|
|00003860| 6f 76 65 20 62 61 63 6b | 77 61 72 64 20 61 63 72 |ove back|ward acr|
|00003870| 6f 73 73 20 41 52 47 20 | 73 68 65 6c 6c 20 63 6f |oss ARG |shell co|
|00003880| 6d 6d 61 6e 64 28 73 29 | 2e 20 20 44 6f 65 73 20 |mmand(s)|. Does |
|00003890| 6e 6f 74 20 63 72 6f 73 | 73 20 6c 69 6e 65 73 2e |not cros|s lines.|
|000038a0| 0a 53 65 65 20 60 73 68 | 65 6c 6c 2d 63 6f 6d 6d |.See `sh|ell-comm|
|000038b0| 61 6e 64 2d 72 65 67 65 | 78 70 27 2e 22 20 22 70 |and-rege|xp'." "p|
|000038c0| 22 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |"]).(def|alias 's|
|000038d0| 68 65 6c 6c 2d 64 79 6e | 61 6d 69 63 2d 63 6f 6d |hell-dyn|amic-com|
|000038e0| 70 6c 65 74 65 2d 63 6f | 6d 6d 61 6e 64 20 23 5b |plete-co|mmand #[|
|000038f0| 6e 69 6c 20 22 c0 20 89 | 19 85 28 00 c2 20 1b c4 |nil ". .|..(.. ..|
|00003900| 8e c5 c6 09 5c 22 2a 3f | 85 28 00 c7 94 8a c8 c9 |....\"*?|.(......|
|00003910| 21 88 60 29 3d 85 28 00 | ca cb 21 88 cc 20 29 87 |!.`)=.(.|..!.. ).|
|00003920| 22 20 5b 63 6f 6d 69 6e | 74 2d 6d 61 74 63 68 2d |" [comin|t-match-|
|00003930| 70 61 72 74 69 61 6c 2d | 66 69 6c 65 6e 61 6d 65 |partial-|filename|
|00003940| 20 66 69 6c 65 6e 61 6d | 65 20 6d 61 74 63 68 2d | filenam|e match-|
|00003950| 64 61 74 61 20 6d 61 74 | 63 68 2d 64 61 74 61 20 |data mat|ch-data |
|00003960| 28 28 73 74 6f 72 65 2d | 6d 61 74 63 68 2d 64 61 |((store-|match-da|
|00003970| 74 61 20 6d 61 74 63 68 | 2d 64 61 74 61 29 29 20 |ta match|-data)) |
|00003980| 73 74 72 69 6e 67 2d 6d | 61 74 63 68 20 22 5b 7e |string-m|atch "[~|
|00003990| 2f 5d 22 20 30 20 73 68 | 65 6c 6c 2d 62 61 63 6b |/]" 0 sh|ell-back|
|000039a0| 77 61 72 64 2d 63 6f 6d | 6d 61 6e 64 20 31 20 6d |ward-com|mand 1 m|
|000039b0| 65 73 73 61 67 65 20 22 | 43 6f 6d 70 6c 65 74 69 |essage "|Completi|
|000039c0| 6e 67 20 63 6f 6d 6d 61 | 6e 64 20 6e 61 6d 65 2e |ng comma|nd name.|
|000039d0| 2e 2e 22 20 73 68 65 6c | 6c 2d 64 79 6e 61 6d 69 |.." shel|l-dynami|
|000039e0| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 61 73 2d 63 6f |c-comple|te-as-co|
|000039f0| 6d 6d 61 6e 64 5d 20 34 | 20 22 5c 0a 44 79 6e 61 |mmand] 4| "\.Dyna|
|00003a00| 6d 69 63 61 6c 6c 79 20 | 63 6f 6d 70 6c 65 74 65 |mically |complete|
|00003a10| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 61 74 20 | the com|mand at |
|00003a20| 70 6f 69 6e 74 2e 0a 54 | 68 69 73 20 66 75 6e 63 |point..T|his func|
|00003a30| 74 69 6f 6e 20 69 73 20 | 73 69 6d 69 6c 61 72 20 |tion is |similar |
|00003a40| 74 6f 20 60 63 6f 6d 69 | 6e 74 2d 64 79 6e 61 6d |to `comi|nt-dynam|
|00003a50| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 66 69 6c 65 |ic-compl|ete-file|
|00003a60| 6e 61 6d 65 27 2c 20 65 | 78 63 65 70 74 20 74 68 |name', e|xcept th|
|00003a70| 61 74 20 69 74 0a 73 65 | 61 72 63 68 65 73 20 60 |at it.se|arches `|
|00003a80| 65 78 65 63 2d 70 61 74 | 68 27 20 28 6d 69 6e 75 |exec-pat|h' (minu|
|00003a90| 73 20 74 68 65 20 74 72 | 61 69 6c 69 6e 67 20 65 |s the tr|ailing e|
|00003aa0| 6d 61 63 73 20 6c 69 62 | 72 61 72 79 20 70 61 74 |macs lib|rary pat|
|00003ab0| 68 29 20 66 6f 72 20 63 | 6f 6d 70 6c 65 74 69 6f |h) for c|ompletio|
|00003ac0| 6e 0a 63 61 6e 64 69 64 | 61 74 65 73 2e 20 20 4e |n.candid|ates. N|
|00003ad0| 6f 74 65 20 74 68 61 74 | 20 74 68 69 73 20 6d 61 |ote that| this ma|
|00003ae0| 79 20 6e 6f 74 20 62 65 | 20 74 68 65 20 73 61 6d |y not be| the sam|
|00003af0| 65 20 61 73 20 74 68 65 | 20 73 68 65 6c 6c 27 73 |e as the| shell's|
|00003b00| 20 69 64 65 61 20 6f 66 | 20 74 68 65 0a 70 61 74 | idea of| the.pat|
|00003b10| 68 2e 0a 0a 43 6f 6d 70 | 6c 65 74 69 6f 6e 20 69 |h...Comp|letion i|
|00003b20| 73 20 64 65 70 65 6e 64 | 65 6e 74 20 6f 6e 20 74 |s depend|ent on t|
|00003b30| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 60 73 68 65 |he value| of `she|
|00003b40| 6c 6c 2d 63 6f 6d 70 6c | 65 74 69 6f 6e 2d 65 78 |ll-compl|etion-ex|
|00003b50| 65 63 6f 6e 6c 79 27 2c | 20 70 6c 75 73 0a 74 68 |econly',| plus.th|
|00003b60| 6f 73 65 20 74 68 61 74 | 20 65 66 66 65 63 74 20 |ose that| effect |
|00003b70| 66 69 6c 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 2e |file com|pletion.|
|00003b80| 20 20 53 65 65 20 60 73 | 68 65 6c 6c 2d 64 79 6e | See `s|hell-dyn|
|00003b90| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 61 73 |amic-com|plete-as|
|00003ba0| 2d 63 6f 6d 6d 61 6e 64 | 27 2e 0a 0a 52 65 74 75 |-command|'...Retu|
|00003bb0| 72 6e 73 20 74 20 69 66 | 20 73 75 63 63 65 73 73 |rns t if| success|
|00003bc0| 66 75 6c 2e 22 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |ful." ni|l]).(def|
|00003bd0| 61 6c 69 61 73 20 27 73 | 68 65 6c 6c 2d 64 79 6e |alias 's|hell-dyn|
|00003be0| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 61 73 |amic-com|plete-as|
|00003bf0| 2d 63 6f 6d 6d 61 6e 64 | 20 23 5b 6e 69 6c 20 22 |-command| #[nil "|
|00003c00| c0 20 86 06 00 c1 1a c3 | 5c 6e 21 1c c5 0e 06 21 |. ......|\n!....!|
|00003c10| 41 1e 07 c8 c9 0e 5c 6e | 21 21 1e 0b 0e 5c 66 85 |A.....\n|!!...\f.|
|00003c20| 25 00 cd ce 0e 5c 66 cf | 23 1e 10 c1 1e 11 d2 1e |%....\f.|#.......|
|00003c30| 13 c1 1e 14 c1 1e 15 d2 | 1e 16 0e 07 83 b0 00 c8 |........|........|
|00003c40| d7 0e 07 40 86 44 00 d8 | 21 21 16 11 d9 0e 11 21 |...@.D..|!!.....!|
|00003c50| 85 54 00 da 5c 66 0e 11 | 5c 22 89 16 13 83 a7 00 |.T..\f..|\"......|
|00003c60| 0e 13 40 16 14 0e 11 0e | 14 50 16 15 0e 14 0e 16 |..@.....|.P......|
|00003c70| 9d 84 9e 00 0e 10 83 7c | 00 db 0e 10 0e 14 5c 22 |.......||......\"|
|00003c80| 84 9e 00 0e 11 0e 0b 98 | 84 8b 00 dc 0e 15 21 84 |........|......!.|
|00003c90| 9e 00 0e 1d 83 97 00 de | 0e 15 21 83 9e 00 0e 14 |........|..!.....|
|00003ca0| 0e 16 42 16 16 0e 13 41 | 89 16 13 84 5a 00 0e 07 |..B....A|....Z...|
|00003cb0| 41 89 16 07 84 3b 00 d2 | 1e 1f e0 5c 66 0e 16 5c |A....;..|...\f..\|
|00003cc0| 22 29 89 1e 21 e2 3e 83 | d0 00 0e 1f 83 d0 00 dc |")..!.>.|........|
|00003cd0| c0 20 21 84 d0 00 e3 63 | 88 0e 21 2e 0b 87 22 20 |. !....c|..!..." |
|00003ce0| 5b 63 6f 6d 69 6e 74 2d | 6d 61 74 63 68 2d 70 61 |[comint-|match-pa|
|00003cf0| 72 74 69 61 6c 2d 66 69 | 6c 65 6e 61 6d 65 20 22 |rtial-fi|lename "|
|00003d00| 22 20 66 69 6c 65 6e 61 | 6d 65 20 66 69 6c 65 2d |" filena|me file-|
|00003d10| 6e 61 6d 65 2d 6e 6f 6e | 64 69 72 65 63 74 6f 72 |name-non|director|
|00003d20| 79 20 70 61 74 68 6e 6f | 6e 64 69 72 20 72 65 76 |y pathno|ndir rev|
|00003d30| 65 72 73 65 20 65 78 65 | 63 2d 70 61 74 68 20 70 |erse exe|c-path p|
|00003d40| 61 74 68 73 20 66 69 6c | 65 2d 6e 61 6d 65 2d 61 |aths fil|e-name-a|
|00003d50| 73 2d 64 69 72 65 63 74 | 6f 72 79 20 65 78 70 61 |s-direct|ory expa|
|00003d60| 6e 64 2d 66 69 6c 65 2d | 6e 61 6d 65 20 64 65 66 |nd-file-|name def|
|00003d70| 61 75 6c 74 2d 64 69 72 | 65 63 74 6f 72 79 20 63 |ault-dir|ectory c|
|00003d80| 77 64 20 63 6f 6d 69 6e | 74 2d 63 6f 6d 70 6c 65 |wd comin|t-comple|
|00003d90| 74 69 6f 6e 2d 66 69 67 | 6e 6f 72 65 20 6d 61 70 |tion-fig|nore map|
|00003da0| 63 6f 6e 63 61 74 20 23 | 5b 28 78 29 20 22 c0 09 |concat #|[(x) "..|
|00003db0| 21 c2 50 87 22 20 5b 72 | 65 67 65 78 70 2d 71 75 |!.P." [r|egexp-qu|
|00003dc0| 6f 74 65 20 78 20 22 24 | 22 5d 20 32 5d 20 22 5c |ote x "$|"] 2] "\|
|00003dd0| 5c 7c 22 20 69 67 6e 6f | 72 65 64 2d 65 78 74 65 |\|" igno|red-exte|
|00003de0| 6e 73 69 6f 6e 73 20 70 | 61 74 68 20 6e 69 6c 20 |nsions p|ath nil |
|00003df0| 63 6f 6d 70 73 2d 69 6e | 2d 70 61 74 68 20 66 69 |comps-in|-path fi|
|00003e00| 6c 65 20 66 69 6c 65 70 | 61 74 68 20 63 6f 6d 70 |le filep|ath comp|
|00003e10| 6c 65 74 69 6f 6e 73 20 | 63 6f 6d 69 6e 74 2d 64 |letions |comint-d|
|00003e20| 69 72 65 63 74 6f 72 79 | 20 22 2e 22 20 66 69 6c |irectory| "." fil|
|00003e30| 65 2d 61 63 63 65 73 73 | 69 62 6c 65 2d 64 69 72 |e-access|ible-dir|
|00003e40| 65 63 74 6f 72 79 2d 70 | 20 66 69 6c 65 2d 6e 61 |ectory-p| file-na|
|00003e50| 6d 65 2d 61 6c 6c 2d 63 | 6f 6d 70 6c 65 74 69 6f |me-all-c|ompletio|
|00003e60| 6e 73 20 73 74 72 69 6e | 67 2d 6d 61 74 63 68 20 |ns strin|g-match |
|00003e70| 66 69 6c 65 2d 64 69 72 | 65 63 74 6f 72 79 2d 70 |file-dir|ectory-p|
|00003e80| 20 73 68 65 6c 6c 2d 63 | 6f 6d 70 6c 65 74 69 6f | shell-c|ompletio|
|00003e90| 6e 2d 65 78 65 63 6f 6e | 6c 79 20 66 69 6c 65 2d |n-execon|ly file-|
|00003ea0| 65 78 65 63 75 74 61 62 | 6c 65 2d 70 20 63 6f 6d |executab|le-p com|
|00003eb0| 69 6e 74 2d 63 6f 6d 70 | 6c 65 74 69 6f 6e 2d 61 |int-comp|letion-a|
|00003ec0| 64 64 73 75 66 66 69 78 | 20 63 6f 6d 69 6e 74 2d |ddsuffix| comint-|
|00003ed0| 64 79 6e 61 6d 69 63 2d | 73 69 6d 70 6c 65 2d 63 |dynamic-|simple-c|
|00003ee0| 6f 6d 70 6c 65 74 65 20 | 73 75 63 63 65 73 73 20 |omplete |success |
|00003ef0| 28 73 6f 6c 65 20 73 68 | 6f 72 74 65 73 74 29 20 |(sole sh|ortest) |
|00003f00| 22 20 22 5d 20 35 20 22 | 5c 0a 44 79 6e 61 6d 69 |" "] 5 "|\.Dynami|
|00003f10| 63 61 6c 6c 79 20 63 6f | 6d 70 6c 65 74 65 20 61 |cally co|mplete a|
|00003f20| 74 20 70 6f 69 6e 74 20 | 61 73 20 61 20 63 6f 6d |t point |as a com|
|00003f30| 6d 61 6e 64 2e 0a 53 65 | 65 20 60 73 68 65 6c 6c |mand..Se|e `shell|
|00003f40| 2d 64 79 6e 61 6d 69 63 | 2d 63 6f 6d 70 6c 65 74 |-dynamic|-complet|
|00003f50| 65 2d 66 69 6c 65 6e 61 | 6d 65 27 2e 20 20 52 65 |e-filena|me'. Re|
|00003f60| 74 75 72 6e 73 20 74 20 | 69 66 20 73 75 63 63 65 |turns t |if succe|
|00003f70| 73 73 66 75 6c 2e 22 5d | 29 0a 28 64 65 66 61 6c |ssful."]|).(defal|
|00003f80| 69 61 73 20 27 73 68 65 | 6c 6c 2d 6d 61 74 63 68 |ias 'she|ll-match|
|00003f90| 2d 70 61 72 74 69 61 6c | 2d 76 61 72 69 61 62 6c |-partial|-variabl|
|00003fa0| 65 20 23 5b 6e 69 6c 20 | 22 8a 60 18 c1 c2 c3 c4 |e #[nil |".`.....|
|00003fb0| 23 83 14 00 c5 c6 21 84 | 14 00 c7 75 88 6c 86 1b |#.....!.|...u.l..|
|00003fc0| 00 c5 c8 21 3f 85 29 00 | c9 ca 08 5c 22 88 cb 94 |...!?.).|...\"...|
|00003fd0| cb 95 7b 2a 87 22 20 5b | 6c 69 6d 69 74 20 72 65 |..{*." [|limit re|
|00003fe0| 2d 73 65 61 72 63 68 2d | 62 61 63 6b 77 61 72 64 |-search-|backward|
|00003ff0| 20 22 5b 5e 41 2d 5a 61 | 2d 7a 30 2d 39 5f 7b 7d | "[^A-Za|-z0-9_{}|
|00004000| 5d 22 20 6e 69 6c 20 6d | 6f 76 65 20 6c 6f 6f 6b |]" nil m|ove look|
|00004010| 69 6e 67 2d 61 74 20 22 | 5c 5c 24 22 20 31 20 22 |ing-at "|\\$" 1 "|
|00004020| 5b 5e 41 2d 5a 61 2d 7a | 30 2d 39 5f 7b 7d 24 5d |[^A-Za-z|0-9_{}$]|
|00004030| 22 20 72 65 2d 73 65 61 | 72 63 68 2d 66 6f 72 77 |" re-sea|rch-forw|
|00004040| 61 72 64 20 22 5c 5c 24 | 3f 7b 3f 5b 41 2d 5a 61 |ard "\\$|?{?[A-Za|
|00004050| 2d 7a 30 2d 39 5f 5d 2a | 7d 3f 22 20 30 5d 20 34 |-z0-9_]*|}?" 0] 4|
|00004060| 20 22 5c 0a 52 65 74 75 | 72 6e 20 74 68 65 20 76 | "\.Retu|rn the v|
|00004070| 61 72 69 61 62 6c 65 20 | 61 74 20 70 6f 69 6e 74 |ariable |at point|
|00004080| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 6e 6f 6e 20 |, or nil| if non |
|00004090| 69 73 20 66 6f 75 6e 64 | 2e 22 5d 29 0a 28 64 65 |is found|."]).(de|
|000040a0| 66 61 6c 69 61 73 20 27 | 73 68 65 6c 6c 2d 64 79 |falias '|shell-dy|
|000040b0| 6e 61 6d 69 63 2d 63 6f | 6d 70 6c 65 74 65 2d 65 |namic-co|mplete-e|
|000040c0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2d 76 61 72 69 61 |nvironme|nt-varia|
|000040d0| 62 6c 65 20 23 5b 6e 69 | 6c 20 22 c0 20 89 19 85 |ble #[ni|l ". ...|
|000040e0| 14 00 c2 c3 09 5c 22 85 | 14 00 c4 c5 21 88 c6 20 |.....\".|....!.. |
|000040f0| 29 87 22 20 5b 73 68 65 | 6c 6c 2d 6d 61 74 63 68 |)." [she|ll-match|
|00004100| 2d 70 61 72 74 69 61 6c | 2d 76 61 72 69 61 62 6c |-partial|-variabl|
|00004110| 65 20 76 61 72 69 61 62 | 6c 65 20 73 74 72 69 6e |e variab|le strin|
|00004120| 67 2d 6d 61 74 63 68 20 | 22 5e 5c 5c 24 22 20 6d |g-match |"^\\$" m|
|00004130| 65 73 73 61 67 65 20 22 | 43 6f 6d 70 6c 65 74 69 |essage "|Completi|
|00004140| 6e 67 20 76 61 72 69 61 | 62 6c 65 20 6e 61 6d 65 |ng varia|ble name|
|00004150| 2e 2e 2e 22 20 73 68 65 | 6c 6c 2d 64 79 6e 61 6d |..." she|ll-dynam|
|00004160| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 61 73 2d 65 |ic-compl|ete-as-e|
|00004170| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2d 76 61 72 69 61 |nvironme|nt-varia|
|00004180| 62 6c 65 5d 20 34 20 22 | 5c 0a 44 79 6e 61 6d 69 |ble] 4 "|\.Dynami|
|00004190| 63 61 6c 6c 79 20 63 6f | 6d 70 6c 65 74 65 20 74 |cally co|mplete t|
|000041a0| 68 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |he envir|onment v|
|000041b0| 61 72 69 61 62 6c 65 20 | 61 74 20 70 6f 69 6e 74 |ariable |at point|
|000041c0| 2e 0a 43 6f 6d 70 6c 65 | 74 65 73 20 69 66 20 61 |..Comple|tes if a|
|000041d0| 66 74 65 72 20 61 20 76 | 61 72 69 61 62 6c 65 2c |fter a v|ariable,|
|000041e0| 20 69 2e 65 2e 2c 20 69 | 66 20 69 74 20 73 74 61 | i.e., i|f it sta|
|000041f0| 72 74 73 20 77 69 74 68 | 20 61 20 5c 22 24 5c 22 |rts with| a \"$\"|
|00004200| 2e 0a 53 65 65 20 60 73 | 68 65 6c 6c 2d 64 79 6e |..See `s|hell-dyn|
|00004210| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 61 73 |amic-com|plete-as|
|00004220| 2d 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2d 76 61 72 |-environ|ment-var|
|00004230| 69 61 62 6c 65 27 2e 0a | 0a 54 68 69 73 20 66 75 |iable'..|.This fu|
|00004240| 6e 63 74 69 6f 6e 20 69 | 73 20 73 69 6d 69 6c 61 |nction i|s simila|
|00004250| 72 20 74 6f 20 60 63 6f | 6d 69 6e 74 2d 64 79 6e |r to `co|mint-dyn|
|00004260| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 66 69 |amic-com|plete-fi|
|00004270| 6c 65 6e 61 6d 65 27 2c | 20 65 78 63 65 70 74 20 |lename',| except |
|00004280| 74 68 61 74 20 69 74 0a | 73 65 61 72 63 68 65 73 |that it.|searches|
|00004290| 20 60 70 72 6f 63 65 73 | 73 2d 65 6e 76 69 72 6f | `proces|s-enviro|
|000042a0| 6e 6d 65 6e 74 27 20 66 | 6f 72 20 63 6f 6d 70 6c |nment' f|or compl|
|000042b0| 65 74 69 6f 6e 20 63 61 | 6e 64 69 64 61 74 65 73 |etion ca|ndidates|
|000042c0| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 74 68 69 |. Note |that thi|
|000042d0| 73 20 6d 61 79 0a 6e 6f | 74 20 62 65 20 74 68 65 |s may.no|t be the|
|000042e0| 20 73 61 6d 65 20 61 73 | 20 74 68 65 20 69 6e 74 | same as| the int|
|000042f0| 65 72 70 72 65 74 65 72 | 27 73 20 69 64 65 61 20 |erpreter|'s idea |
|00004300| 6f 66 20 76 61 72 69 61 | 62 6c 65 20 6e 61 6d 65 |of varia|ble name|
|00004310| 73 2e 20 20 54 68 65 20 | 6d 61 69 6e 20 70 72 6f |s. The |main pro|
|00004320| 62 6c 65 6d 0a 77 69 74 | 68 20 74 68 69 73 20 74 |blem.wit|h this t|
|00004330| 79 70 65 20 6f 66 20 63 | 6f 6d 70 6c 65 74 69 6f |ype of c|ompletio|
|00004340| 6e 20 69 73 20 74 68 61 | 74 20 60 70 72 6f 63 65 |n is tha|t `proce|
|00004350| 73 73 2d 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 27 20 |ss-envir|onment' |
|00004360| 69 73 20 74 68 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |is the e|nvironme|
|00004370| 6e 74 0a 77 68 69 63 68 | 20 45 6d 61 63 73 20 73 |nt.which| Emacs s|
|00004380| 74 61 72 74 65 64 20 77 | 69 74 68 2e 20 20 45 6d |tarted w|ith. Em|
|00004390| 61 63 73 20 64 6f 65 73 | 20 6e 6f 74 20 74 72 61 |acs does| not tra|
|000043a0| 63 6b 20 63 68 61 6e 67 | 65 73 20 74 6f 20 74 68 |ck chang|es to th|
|000043b0| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 6d 61 |e enviro|nment ma|
|000043c0| 64 65 0a 62 79 20 74 68 | 65 20 69 6e 74 65 72 70 |de.by th|e interp|
|000043d0| 72 65 74 65 72 2e 20 20 | 50 65 72 68 61 70 73 20 |reter. |Perhaps |
|000043e0| 69 74 20 77 6f 75 6c 64 | 20 62 65 20 6d 6f 72 65 |it would| be more|
|000043f0| 20 61 63 63 75 72 61 74 | 65 20 69 66 20 74 68 69 | accurat|e if thi|
|00004400| 73 20 66 75 6e 63 74 69 | 6f 6e 20 77 61 73 0a 63 |s functi|on was.c|
|00004410| 61 6c 6c 65 64 20 60 73 | 68 65 6c 6c 2d 64 79 6e |alled `s|hell-dyn|
|00004420| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 70 72 |amic-com|plete-pr|
|00004430| 6f 63 65 73 73 2d 65 6e | 76 69 72 6f 6e 6d 65 6e |ocess-en|vironmen|
|00004440| 74 2d 76 61 72 69 61 62 | 6c 65 27 2e 0a 0a 52 65 |t-variab|le'...Re|
|00004450| 74 75 72 6e 73 20 6e 6f | 6e 2d 6e 69 6c 20 69 66 |turns no|n-nil if|
|00004460| 20 73 75 63 63 65 73 73 | 66 75 6c 2e 22 20 6e 69 | success|ful." ni|
|00004470| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |l]).(def|alias 's|
|00004480| 68 65 6c 6c 2d 64 79 6e | 61 6d 69 63 2d 63 6f 6d |hell-dyn|amic-com|
|00004490| 70 6c 65 74 65 2d 61 73 | 2d 65 6e 76 69 72 6f 6e |plete-as|-environ|
|000044a0| 6d 65 6e 74 2d 76 61 72 | 69 61 62 6c 65 20 23 5b |ment-var|iable #[|
|000044b0| 6e 69 6c 20 22 c0 20 86 | 06 00 c1 89 1a c3 c4 5c |nil ". .|.......\|
|000044c0| 6e 5c 22 86 10 00 c5 c6 | 4f 1e 07 c8 c9 0e 5c 6e |n\".....|O.....\n|
|000044d0| 5c 22 1e 0b 0e 5c 66 1e | 0d c6 1e 5c 66 ce 0e 07 |\"...\f.|...\f...|
|000044e0| 0e 0b 5c 22 89 1e 0f d0 | 3e 83 78 00 c0 20 89 1a |..\"....|>.x.. ..|
|000044f0| c3 d1 5c 6e 5c 22 c6 4f | 1e 07 c3 d2 5c 6e 5c 22 |..\n\".O|....\n\"|
|00004500| 83 47 00 d3 82 53 00 c3 | d4 5c 6e 5c 22 83 52 00 |.G...S..|.\n\".R.|
|00004510| d5 82 53 00 c1 1e 16 0e | 0d 84 5e 00 c1 82 6e 00 |..S.....|..^...n.|
|00004520| d7 d8 d9 0e 07 21 21 21 | 83 6d 00 da 82 6e 00 db |.....!!!|.m...n..|
|00004530| 1e 1c 0e 16 0e 1c b1 02 | 88 2c 0e 0f 2e 06 87 22 |........|.,....."|
|00004540| 20 5b 73 68 65 6c 6c 2d | 6d 61 74 63 68 2d 70 61 | [shell-|match-pa|
|00004550| 72 74 69 61 6c 2d 76 61 | 72 69 61 62 6c 65 20 22 |rtial-va|riable "|
|00004560| 22 20 76 61 72 20 73 74 | 72 69 6e 67 2d 6d 61 74 |" var st|ring-mat|
|00004570| 63 68 20 22 5b 5e 24 28 | 7b 5d 5c 5c 7c 24 22 20 |ch "[^$(|{]\\|$" |
|00004580| 30 20 6e 69 6c 20 76 61 | 72 69 61 62 6c 65 20 6d |0 nil va|riable m|
|00004590| 61 70 63 61 72 20 23 5b | 28 78 29 20 22 08 c1 c2 |apcar #[|(x) "...|
|000045a0| c3 08 5c 22 4f 87 22 20 | 5b 78 20 30 20 73 74 72 |..\"O." |[x 0 str|
|000045b0| 69 6e 67 2d 6d 61 74 63 | 68 20 22 3d 22 5d 20 35 |ing-matc|h "="] 5|
|000045c0| 5d 20 70 72 6f 63 65 73 | 73 2d 65 6e 76 69 72 6f |] proces|s-enviro|
|000045d0| 6e 6d 65 6e 74 20 76 61 | 72 69 61 62 6c 65 73 20 |nment va|riables |
|000045e0| 63 6f 6d 69 6e 74 2d 63 | 6f 6d 70 6c 65 74 69 6f |comint-c|ompletio|
|000045f0| 6e 2d 61 64 64 73 75 66 | 66 69 78 20 61 64 64 73 |n-addsuf|fix adds|
|00004600| 75 66 66 69 78 20 63 6f | 6d 69 6e 74 2d 64 79 6e |uffix co|mint-dyn|
|00004610| 61 6d 69 63 2d 73 69 6d | 70 6c 65 2d 63 6f 6d 70 |amic-sim|ple-comp|
|00004620| 6c 65 74 65 20 73 75 63 | 63 65 73 73 20 28 73 6f |lete suc|cess (so|
|00004630| 6c 65 20 73 68 6f 72 74 | 65 73 74 29 20 22 5b 5e |le short|est) "[^|
|00004640| 24 28 7b 5d 22 20 22 7b | 22 20 22 7d 22 20 22 28 |$({]" "{|" "}" "(|
|00004650| 22 20 22 29 22 20 70 72 | 6f 74 65 63 74 69 6f 6e |" ")" pr|otection|
|00004660| 20 66 69 6c 65 2d 64 69 | 72 65 63 74 6f 72 79 2d | file-di|rectory-|
|00004670| 70 20 63 6f 6d 69 6e 74 | 2d 64 69 72 65 63 74 6f |p comint|-directo|
|00004680| 72 79 20 67 65 74 65 6e | 76 20 22 2f 22 20 22 20 |ry geten|v "/" " |
|00004690| 22 20 73 75 66 66 69 78 | 5d 20 35 20 22 5c 0a 44 |" suffix|] 5 "\.D|
|000046a0| 79 6e 61 6d 69 63 61 6c | 6c 79 20 63 6f 6d 70 6c |ynamical|ly compl|
|000046b0| 65 74 65 20 61 74 20 70 | 6f 69 6e 74 20 61 73 20 |ete at p|oint as |
|000046c0| 61 6e 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 76 |an envir|onment v|
|000046d0| 61 72 69 61 62 6c 65 2e | 0a 55 73 65 64 20 62 79 |ariable.|.Used by|
|000046e0| 20 60 73 68 65 6c 6c 2d | 64 79 6e 61 6d 69 63 2d | `shell-|dynamic-|
|000046f0| 63 6f 6d 70 6c 65 74 65 | 2d 65 6e 76 69 72 6f 6e |complete|-environ|
|00004700| 6d 65 6e 74 2d 76 61 72 | 69 61 62 6c 65 27 2e 0a |ment-var|iable'..|
|00004710| 55 73 65 73 20 60 63 6f | 6d 69 6e 74 2d 64 79 6e |Uses `co|mint-dyn|
|00004720| 61 6d 69 63 2d 73 69 6d | 70 6c 65 2d 63 6f 6d 70 |amic-sim|ple-comp|
|00004730| 6c 65 74 65 27 2e 22 5d | 29 0a 28 64 65 66 61 6c |lete'."]|).(defal|
|00004740| 69 61 73 20 27 73 68 65 | 6c 6c 2d 72 65 70 6c 61 |ias 'she|ll-repla|
|00004750| 63 65 2d 62 79 2d 65 78 | 70 61 6e 64 65 64 2d 64 |ce-by-ex|panded-d|
|00004760| 69 72 65 63 74 6f 72 79 | 20 23 5b 6e 69 6c 20 22 |irectory| #[nil "|
|00004770| c0 20 85 55 00 8a c1 94 | 62 88 5c 6e 0b 42 c4 c5 |. .U....|b.\n.B..|
|00004780| 21 83 18 00 0b 47 82 25 | 00 c4 c6 21 85 25 00 c7 |!....G.%|...!.%..|
|00004790| c8 94 c8 95 7b 21 1e 09 | 1e 5c 6e 0e 09 84 32 00 |....{!..|.\n...2.|
|000047a0| cb 82 54 00 0e 09 0e 5c | 6e 47 59 83 41 00 cc cd |..T....\|nGY.A...|
|000047b0| 21 82 54 00 ce cf 0e 09 | 0e 5c 6e 38 21 d0 89 23 |!.T.....|.\n8!..#|
|000047c0| 88 d1 d2 0e 09 5c 22 88 | d0 2b 87 22 20 5b 63 6f |.....\".|.+." [co|
|000047d0| 6d 69 6e 74 2d 6d 61 74 | 63 68 2d 70 61 72 74 69 |mint-mat|ch-parti|
|000047e0| 61 6c 2d 66 69 6c 65 6e | 61 6d 65 20 30 20 64 65 |al-filen|ame 0 de|
|000047f0| 66 61 75 6c 74 2d 64 69 | 72 65 63 74 6f 72 79 20 |fault-di|rectory |
|00004800| 73 68 65 6c 6c 2d 64 69 | 72 73 74 61 63 6b 20 6c |shell-di|rstack l|
|00004810| 6f 6f 6b 69 6e 67 2d 61 | 74 20 22 3d 2d 2f 3f 22 |ooking-a|t "=-/?"|
|00004820| 20 22 3d 5c 5c 28 5b 30 | 2d 39 5d 2b 5c 5c 29 22 | "=\\([0|-9]+\\)"|
|00004830| 20 73 74 72 69 6e 67 2d | 74 6f 2d 6e 75 6d 62 65 | string-|to-numbe|
|00004840| 72 20 31 20 69 6e 64 65 | 78 20 73 74 61 63 6b 20 |r 1 inde|x stack |
|00004850| 6e 69 6c 20 65 72 72 6f | 72 20 22 44 69 72 65 63 |nil erro|r "Direc|
|00004860| 74 6f 72 79 20 73 74 61 | 63 6b 20 6e 6f 74 20 74 |tory sta|ck not t|
|00004870| 68 61 74 20 64 65 65 70 | 2e 22 20 72 65 70 6c 61 |hat deep|." repla|
|00004880| 63 65 2d 6d 61 74 63 68 | 20 66 69 6c 65 2d 6e 61 |ce-match| file-na|
|00004890| 6d 65 2d 61 73 2d 64 69 | 72 65 63 74 6f 72 79 20 |me-as-di|rectory |
|000048a0| 74 20 6d 65 73 73 61 67 | 65 20 22 44 69 72 65 63 |t messag|e "Direc|
|000048b0| 74 6f 72 79 20 69 74 65 | 6d 3a 20 25 64 22 5d 20 |tory ite|m: %d"] |
|000048c0| 34 20 22 5c 0a 45 78 70 | 61 6e 64 20 64 69 72 65 |4 "\.Exp|and dire|
|000048d0| 63 74 6f 72 79 20 73 74 | 61 63 6b 20 72 65 66 65 |ctory st|ack refe|
|000048e0| 72 65 6e 63 65 20 62 65 | 66 6f 72 65 20 70 6f 69 |rence be|fore poi|
|000048f0| 6e 74 2e 0a 44 69 72 65 | 63 74 6f 72 79 20 73 74 |nt..Dire|ctory st|
|00004900| 61 63 6b 20 72 65 66 65 | 72 65 6e 63 65 73 20 61 |ack refe|rences a|
|00004910| 72 65 20 6f 66 20 74 68 | 65 20 66 6f 72 6d 20 5c |re of th|e form \|
|00004920| 22 3d 64 69 67 69 74 5c | 22 20 6f 72 20 5c 22 3d |"=digit\|" or \"=|
|00004930| 2d 5c 22 2e 0a 53 65 65 | 20 60 64 65 66 61 75 6c |-\"..See| `defaul|
|00004940| 74 2d 64 69 72 65 63 74 | 6f 72 79 27 20 61 6e 64 |t-direct|ory' and|
|00004950| 20 60 73 68 65 6c 6c 2d | 64 69 72 73 74 61 63 6b | `shell-|dirstack|
|00004960| 27 2e 0a 0a 52 65 74 75 | 72 6e 73 20 74 20 69 66 |'...Retu|rns t if|
|00004970| 20 73 75 63 63 65 73 73 | 66 75 6c 2e 22 20 6e 69 | success|ful." ni|
|00004980| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |l]).(def|alias 's|
|00004990| 68 65 6c 6c 2d 73 74 72 | 69 70 2d 63 74 72 6c 2d |hell-str|ip-ctrl-|
|000049a0| 6d 20 23 5b 28 26 6f 70 | 74 69 6f 6e 61 6c 20 73 |m #[(&op|tional s|
|000049b0| 74 72 69 6e 67 29 20 22 | c0 c1 70 21 21 1a 8a 74 |tring) "|..p!!..t|
|000049c0| 83 0f 00 0b 82 10 00 5c | 66 62 88 c5 c6 5c 6e c7 |.......\|fb...\n.|
|000049d0| 23 85 23 00 c8 c9 c7 89 | 23 88 82 12 00 2a 87 22 |#.#.....|#....*."|
|000049e0| 20 5b 70 72 6f 63 65 73 | 73 2d 6d 61 72 6b 20 67 | [proces|s-mark g|
|000049f0| 65 74 2d 62 75 66 66 65 | 72 2d 70 72 6f 63 65 73 |et-buffe|r-proces|
|00004a00| 73 20 70 6d 61 72 6b 20 | 63 6f 6d 69 6e 74 2d 6c |s pmark |comint-l|
|00004a10| 61 73 74 2d 69 6e 70 75 | 74 2d 65 6e 64 20 63 6f |ast-inpu|t-end co|
|00004a20| 6d 69 6e 74 2d 6c 61 73 | 74 2d 6f 75 74 70 75 74 |mint-las|t-output|
|00004a30| 2d 73 74 61 72 74 20 72 | 65 2d 73 65 61 72 63 68 |-start r|e-search|
|00004a40| 2d 66 6f 72 77 61 72 64 | 20 22 0d 2b 24 22 20 74 |-forward| ".+$" t|
|00004a50| 20 72 65 70 6c 61 63 65 | 2d 6d 61 74 63 68 20 22 | replace|-match "|
|00004a60| 22 5d 20 34 20 22 5c 0a | 53 74 72 69 70 20 74 72 |"] 4 "\.|Strip tr|
|00004a70| 61 69 6c 69 6e 67 20 60 | 5e 4d 27 20 63 68 61 72 |ailing `|^M' char|
|00004a80| 61 63 74 65 72 73 20 66 | 72 6f 6d 20 74 68 65 20 |acters f|rom the |
|00004a90| 63 75 72 72 65 6e 74 20 | 6f 75 74 70 75 74 20 67 |current |output g|
|00004aa0| 72 6f 75 70 2e 0a 0a 54 | 68 69 73 20 66 75 6e 63 |roup...T|his func|
|00004ab0| 74 69 6f 6e 20 63 6f 75 | 6c 64 20 62 65 20 69 6e |tion cou|ld be in|
|00004ac0| 20 74 68 65 20 6c 69 73 | 74 20 60 63 6f 6d 69 6e | the lis|t `comin|
|00004ad0| 74 2d 6f 75 74 70 75 74 | 2d 66 69 6c 74 65 72 2d |t-output|-filter-|
|00004ae0| 66 75 6e 63 74 69 6f 6e | 73 27 20 6f 72 20 62 6f |function|s' or bo|
|00004af0| 75 6e 64 20 74 6f 0a 61 | 20 6b 65 79 2e 22 20 6e |und to.a| key." n|
|00004b00| 69 6c 5d 29 0a 28 70 72 | 6f 76 69 64 65 20 28 71 |il]).(pr|ovide (q|
|00004b10| 75 6f 74 65 20 73 68 65 | 6c 6c 29 29 0a |uote she|ll)). |
+--------+-------------------------+-------------------------+--------+--------+